cancel
Showing results for 
Search instead for 
Did you mean: 

Script output Issue

Former Member
0 Kudos

Hi All,

I am working on script, Getting the output on Pdf as mentioned below, as per the requirement the credit entry CR1 should come as

-96.00. I have debugged the report attached with it and I can see that the field SHKZG(Debit/Credit Indicator) of table REGUP is not used, Please let me know the possible reasons and how ican get the value CR1 as -96 in output. find below the code for your refrence.

PDF OUTPUT

11/11/09 PR21 800.00

13/11/09 PR22 800.00

01/01/10 PR22 800.00

03/01/10 CR1 96.00

__________________________________

GBP Total 2,304.00

CODE SAMPLE ASSOCIATED WITH IT.

FORM F8210_MOVE_DATA_TO_REGUP.

CLEAR: WS_RWBTR ,

WS_VAR ,

WS_VAR1 .

SORT INT_REGUP BY BLDAT .

CLEAR WA_REGUP.

LOOP AT INT_REGUP INTO WA_REGUP WHERE

LAUFD = WA_OUTPUT-LAUFD

AND LAUFI = WA_OUTPUT-LAUFI

AND XVORL = WA_OUTPUT-XVORL

AND ZBUKR = WA_OUTPUT-ZBUKR

AND LIFNR = WA_OUTPUT-LIFNR

AND VBLNR = WA_OUTPUT-VBLNR

AND BUKRS = WA_OUTPUT-BUKRS.

MOVE: WA_REGUP-XBLNR TO REGUP-XBLNR,

WA_REGUP-BLDAT TO REGUP-BLDAT,

WA_REGUP-WRBTR TO REGUD-WRBTR.

  • Call write form for element 625 of main window

PERFORM F8150_WRITE_FORM USING '625' 'MAIN'.

CLEAR WA_REGUP.

ENDLOOP.

WS_VAR1 = WA_OUTPUT-RWBTR.

WS_VAR = STRLEN( WS_VAR1 ).

WS_VAR = WS_VAR - 1.

WS_RWBTR = WS_VAR1+0(WS_VAR).

REGUD-SWRBT = WS_RWBTR.

ENDFORM. " f8210_move_data_to_regup

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

One more question on this.....is there some other program to upload the form from desktop to sap system? Because i tried a lot with rstxscrp but it is not working....

Former Member
0 Kudos

Hi ,

It will work , check once the file in the desktop that is downloaded from other server ..

Former Member
0 Kudos

we need to use <->.

vikas

Former Member
0 Kudos

By the way is it that export stands for downloading a form from sap to other system and import stands for uploading a form from other system to sap? Am I correct?

Former Member
0 Kudos

Yes

Former Member
0 Kudos

Hi,

I am trying to transport form from production to development server. I uploaded the form to my desktop by means of the standard program. But when I try to upload it to sap I am not getting the exact form. Already a form exists with that name in my development server. And I am trying to overwrite it.

Would be great if anyone can help on this.

Former Member
0 Kudos

Hi ,

Delete the existing(Before that take the backup of old form) one and try to upload after deleting

Former Member
0 Kudos

Hi ,

Use the formatting option ..... Ex . &it_wrbtr(.0)& o/p 96

&it_wrbtr(.1)& o/p 96.0

Let me know the status

Former Member
0 Kudos

HI,

This is the statement passing this value as 96.00.

WA_REGUP-WRBTR TO REGUD-WRBTR.

It's a Z report calling a script and output in Pdf.

How i can use Formatting option.

Pls revert.

Vikas

Former Member
0 Kudos

Hi,

I am applying the following code to get the value as -96.

Data: zwrbtr(10) type c.

if wa_regup-shkzg = 'S'.

write wa_regup-wrbtr to zwrbtr.

concatenate '-' zwrbtr into zwrbtr.

move: zwrbtr to regud-wrbtr.

else.

move: wa_regup-wrbtr to regud-wrbtr.

endif.

But, the problem here is after writing the value of WA_REGUP-WRBTR to C type Variable ZWRBTR and CONCATENATING I getting the required value in ZWRBTR, Now again I have t pass this value to REGUD-WRBTR which is type CURRY and I am getting dump here because system not accepting the CHAR value in CURRY field.

Pls suggest..

Regards,

Vikas

Former Member
0 Kudos

Hi,

REGUP(Processed items for Payment Program) is a Cluster Table.

REGUD(Form Print Transfer Data) is a structure.

WRBTR is CURRYField in both the above Table/Structure.

I need to pass the converted value -96 to REGUD-WRBTR structure.

Do i need to change the REGUD structure field WRBTR to CHAR/NUMC from CURRY.

Vikas

antony_paul2
Active Participant
0 Kudos

WRBTR is a Currency data element with no sign

So what you can do is create another field in your work area WA_REGUP with dataelement WRSHB

And do the followwing logic


if wa_regup-shkzg = 'S'.
wa_regup-WRSHB = 0 - wa_regup-wrbtr .
endif.

Now in the script use &wa_regup-wrshb&

Former Member
0 Kudos

Hi,

Need to pass this value to REGUD-WRBTR(CURRY) which is a table to pass the value in Script for printing.

Report is using table T042B to get the form name and It's difficult to do the chages in standard FORM.

Vikas.

antony_paul2
Active Participant
0 Kudos

Sorry Vikas,

I was looking at the data element WRBTR, But the field REGUD-WRBTR is refering to DE WRBTV, Which has sign

So all you need to do is.


if wa_regup-shkzg = 'S'.
wa_regup-wrbtr = 0 - wa_regup-wrbtr .
endif.

afterwards pass it to the standard structure


regup-wrbtr = wa_regup-wrbtr .

IF regup-wrbtr was 90.00 in the begning, now in the script it will show as 90.00- .