Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

checkprinting

Former Member
0 Likes
917

In check printing i am getting a dump saying that the actual parameter is 670bytes long and formal parameter is 2278bytes.

The code is

PERFORM EXTRACT IN PROGRAM ZSUBROUTINE1

USING &REGUH-VBLNR&

USING &REGUD-SWNES&

ENDPERFORM

&REGUD-SWNES&

FORM EXTRACT TABLES IN_PAR STRUCTURE REGUH OUT_PAR STRUCTURE REGUD.

DATA : BILL_NO LIKE REGUH-VBLNR.

DATA : ITAB LIKE REGUP OCCURS 0 WITH HEADER LINE.

DATA : JTAB LIKE REGUP OCCURS 0 WITH HEADER LINE.

DATA : BELNR1 LIKE ITAB-BELNR.

DATA : QBSHB1 LIKE REGUD-SWNES.

DATA : QBSHB2 LIKE REGUD-SWNES.

DATA : TOTOQBSHB LIKE REGUD-SWNES.

READ TABLE IN_PAR WITH KEY VBLNR = 'REGUH-VBLNR'.

BILL_NO = IN_PAR-VBLNR.

SELECT * FROM REGUP INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE VBLNR

= BILL_NO.

READ TABLE ITAB INDEX 1.

IF SY-SUBRC = 0.

MOVE ITAB-QBSHB TO QBSHB1.

MOVE ITAB-BELNR TO BELNR1.

ENDIF.

SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE BELNR

= BELNR1.

LOOP AT JTAB.

READ TABLE JTAB INDEX SY-TABIX.

IF SY-SUBRC = 0.

QBSHB2 = QBSHB2 + JTAB-QBSHB.

ENDIF.

ENDLOOP.

TOTOQBSHB = QBSHB1 + QBSHB2.

READ TABLE OUT_PAR WITH KEY SWNES = 'REGUD-SWNES'.

CLEAR REGUD.

MOVE TOTOQBSHB TO OUT_PAR-SWNES.

ENDFORM.

5 REPLIES 5
Read only

Vinod_Chandran
Active Contributor
0 Likes
747

Hi,

I think your FORM declararion should be like

FORM <form> TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

Please try this.

Thanks

Vinod

Read only

Read only

Former Member
0 Likes
747

Your definition of routine is wrong, but it'll be like this:

FORM EXTRACT TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

ENDFORM.

The strutcute ITCSY have two field where you can find the name and value of your variable.

So your code'll be like that:

DATA : BILL_NO LIKE REGUH-VBLNR.

READ TABLE IN_TAB WITH KEY FIELD = 'REGUH-VBLNR'.

IF SY-SUBRC = 0.

MOVE IN_TAB-VALUE TO BILL_NO.

Here you can probably use a convert routine to get out the right value (for example ALPHA).

SELECT * FROM REGUP INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE VBLNR

= BILL_NO.

.........

ENDIF.

When you want to get out a value:

READ TABLE out_TAB WITH KEY FIELD = 'MY_FIELD'.

IF SY-SUBRC = 0.

MOVE <VALUE> TO OUT_TAB-VALUE.

MODIFY OUT_TAB INDEX SY-TABIX.

ENDIF.

Read only

Vinod_Chandran
Active Contributor
0 Likes
747

Hi Mave,

If your question is answered please close the thread and reward accordingly.

Thanks

Vinod

Read only

Former Member
0 Likes
747

Hi Mave,

The problem you have is because you defined your form as receiving two TABLE parameters, while your perform statement is passing USING parameters &REGUH-VBLNR& and &REGUD-SWNES&. Either change your perform call passing tables to the call or change your FORM removing the TABLES parameters and adding USING parameters.

Please reward and close the post if answered.

Srinivas