on 10-01-2014 9:10 AM
Dear Experts,
I am developing print form using Adobe.
my form is working perfectly as per the requiement excet one issue. In my print form I dont want to display the 0.00 value instead it shuld be display as plak. If any values is that in the cell then only it should display the value.
I saw few threads in SDN before posting this question.
Some one suggested that we need to change the filed to text fiel and write java.script to get this.
I followd tha same but did not get the requried result.
I want my output to look like.
Thanks and Regards
Anees Ahmed Jawad
The Java script will not work only if the field is of type currency field in the layout. But if the field is of type text field, then it should work.
And also there is a better option if Java script needs to be avoided. What you need to do is, declare the amount fields in the structure of type CHAR of sufficient decimal places corresponding to the actual Currency data element. Then the amount can be checked for the Initial value in ABAP itself and then it can be set to space.
You can follow the below steps to achieve it.
Write a test program in SE38 as below.
PARAMETERS: p_curr TYPE bp_amnt.
DATA: g_char TYPE char20.
IF p_curr IS NOT INITIAL.
WRITE p_curr TO g_char.
ELSE.
g_char = ' '.
ENDIF.
CONDENSE g_char NO-GAPS.
WRITE:/ 'p_curr is', p_curr.
WRITE:/ 'g_char is', g_char.
Now execute this report. Enter the amount in selection screen. In output the entered amount is displayed in variable p_curr and the same amount is displayed in g_char but which is of type CHAR.
First enter the amount as 1000 as below.
The output will be as shown below. Both the variables are displayed and the amount format is retained in g_char variable.
Now enter the zero amount in the selection screen as below.
This time, the output of p_curr will be 0.00 but the amount of g_char will be space as shown below.
So in similar way, use the value of g_char to fill the amounts in the structure and pass it to the Adobe form. And since the Java script is avoided, the performance of the form will be better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all your quick support.
Because of some other important deliverables, I am not looking in to this issue as testing team is also busy with this output and other things (my output in PDF is 100% coreect other then this issue). After exploring the options given by you people I will come back.
Thanks and Regards
Anees Ahmed Jawad
Hello Anees,
Write the below Java script in the Initialize event of all the 3 fields which are currently showing "0.00".
if ( this.rawValue == "0.00" )
{
this.rawValue = " ";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anees,
You just can hide the field with a small javascript statement:
It should look like this:
IF (this.field.value == "" ) <-- depends on what the initial value has
this.field.presence = "hidden";
ENDIF;
or my personal way would be
Set the condition in the interface
and do nothing in javascript
~Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.