Hi All,
Below document provides step by step guideline as to how Script Option can be used to select Logo based on the value of a text field in SAP Adobe forms . Here we will make use of Java Script.
Business Scenario:
Suppose a Client has more than one company code and logo for each Company code is different.
Requirement is to have a Logo on the form based on the Company code.
Example : Company Code Details are as follows:
Company Code | Logo |
---|---|
110 | |
210 | |
310 |
Steps to be followed are :
within a Sub Form as Shown below.Provide the Image Mapping to the Respective fields
.And Java Script at Event : initialize for each Image field : For this select the image Field : Logo_110 as shown in figure below in Script Editor choose Language as 'Java Script'. In the Script Editor write the code as below :
Pseudo code :
data.Main.Header.General.Info_Left.Company_Logo_Addres.Logo_110::initialize - (JavaScript, client) - " this tells /elementthe position where script is inserted
if(Company_Logo_Addres.BUKRS.rawValue != 110) "The value to be compared will change for each Image Field 210 or 310
{
this.presence = "hidden"; " Set the property of the Image Field
}
Based on the value of im_bukrs we set the layout property of the Image Fields at runtime. Repeat the Same for other Image Fields :Logo_210 and Logo_310, compare BUKRS value with 210 and 310 respectively. And we are done with our part!
Now run the form provide the company code and see the output for different company codes.
IM_BUKRS (Company Code Value) | Output |
---|---|
Any questions or comments are welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
53 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |