cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript F110_PRENUM_CHCK, change REGUP line items in window MAIN

0 Kudos

Hi,

I am trying to change the line items on the cheque advice form. I have copied SAPscript F110_PRENUM_CHCK and it's print program RFFOUS_C to Z ones and this is what I'm trying to do:

In the MAIN window, instead of printing:

&REGUP-BLDAT&,,&REGUP-BELNR&,,&REGUP-WRBTR&

I would like to print:

&ZREGUP-BLDAT1&,,&ZREGUP-BELNR1&,,&ZREGUP-WRBTR1&,,&ZREGUP-BLDAT2&,,&ZREGUP-BELNR2&,,&ZREGUP-WRBTR2&

In other words, I would like to print two line items on the same line.

I have declared my table ZREGUP in the print program and in the INCLUDE ZRFFORI01 (which is a copy of RFFORI01) and then filled it from REGUP, so instead of having 4 lines in REGUP, I have 2 lines in ZREGUP (the first line item is in fields 1 line 1, the second line item is in fields 2 line 1, the third line item is in fields 1 line 2 etc). Plus I've changed the fields in my SAPscript window MAIN.

BUT, it appears that window MAIN is called 4 times, presumably once for each line item in REGUP. It's still called 4 times and each line is blank (I know it's called 4 times as WRBTR1 and 2 are 0.00 and they appear on the print out).

SO, I've filled my table ZREGUP but either it's not available when MAIN is called or I've done something wrong.

Can anyone help? Any suggestions are very welcome. If it's not possible, please tell me and I'll tell my clients that the layout needs to change.

Thanks in advance,

Gill

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Thanks guys.

I solved this by moving my table declaration to a copy o include RFFORI00 and declaring a new text element in window MAIN and calling that using the function module WRITE_FORM within a loop of my internal table ZREGUP.

naresh_bammidi
Contributor
0 Kudos

Hi,

Can you paste the code snippet over here?

with regards

Naresh Bammidi

0 Kudos

I'm not sure the code is relevent here as the issue I'm having is that although my Z table is being populated, it's not available to window MAIN.

But here it is:


  IF zregup IS INITIAL.
    MOVE-CORRESPONDING regup TO zregup.
  ELSE.
    MOVE: regup-bldat TO zregup-bldat2,
          regup-belnr TO zregup-belnr2,
          regup-wrbtr TO zregup-wrbtr2.
    APPEND zregup.
    CLEAR zregup.
  ENDIF.

Edited by: Ackroyd Gill on Dec 14, 2011 10:10 AM

naresh_bammidi
Contributor
0 Kudos

Hi,

Did you check the internal table data in debugging mode? If so ,is it getting zregup table data?can you post write_form code to call the main window...

with regards

Naresh Bammidi

0 Kudos

My internal table ZREGUP is being populated (see the code I posted above), I have checked this is debug mode.

The MAIN window is being called as standard (my print program is copied from standard) so I'm not sure how helpful it is for me to post standard code which I haven't changed.

naresh_bammidi
Contributor
0 Kudos

Hi,

Double check your driver program.inclue,and form,whether they have been activated or not.if so,Declare one element in form and fill that element by calling write_form and looping zregup internal table.

with regards

Naresh

Edited by: naresh bammidi on Dec 14, 2011 11:26 AM

nabheetscn
Active Contributor
0 Kudos

Make sure ZREGUP is declared fgloablly plus you are looping on internal table and have called WRITE_FORM for same

Nabheet