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

SAP Script

madan_ullasa
Contributor
0 Likes
671

hi frnds,

i have a requirement where a single page has the same line items printed twice. its like a duplicate copy that can be detached. i have no control over the driver program since im using a standard program. is it possible to do this through the layout only?

i have tried many things without success....

points assured to all replies.

regards,

Madan...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
642

YOu will need to debug the SAP Script --> Utilities --> start debug.

In debugging mode, locate where the line items are printed.

Copy and paste it below it.

Please reward if helpful.

cheers,

7 REPLIES 7
Read only

Former Member
0 Likes
643

YOu will need to debug the SAP Script --> Utilities --> start debug.

In debugging mode, locate where the line items are printed.

Copy and paste it below it.

Please reward if helpful.

cheers,

Read only

Former Member
0 Likes
642

Hello Madan,

Use the form statement in MAIN window like this.

PERFORM DEL_DUPLICATE_ENTRIES IN PROGRAM ZPROG

TABLES ITAB.

IN the ZPROG.

FORM DEL_DUPLICATE_ENTRIES TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy .

<b>DELETE ADJACENT DULICATES FROM ITAB COMPARING POSNR.</b>

ENDFORM

If useful reward.

Vasanth

Read only

Former Member
0 Likes
642

hi,

If you cannot change the driver program, then i dont think there is any way to change the output by changing the layout. if the internal table has some duplicate entries that they will get printed in the output. However, if you can make changes in the driver program then only you can write some form which you can call from the layout that deletes the duplicates from the internal. You can debut the code to find out where exactly the problem arise.

Regards,

Richa

Read only

Former Member
0 Likes
642

Hi,

If you want to achieve this functionality, one way of doing this is --- identify the section of the code in the line editor and repeat the same.

FOR EG.

DO 2 TIMES.

/*IT_VBAP-POSNR.

ENDDO.

Now, the above statement will repeat your output two times and if you want to do it in only on the first page.

if &formpages& = 1.

do 2 times.

/*IT_VBAP-POSNR.

ENDDO.

Hope this helps you, if so reward points.

Regards

Read only

0 Likes
642

hi,

you cannot use "DO" and "ENDDO" in a form layout !!!!!!!!

regards,

Madan..

Read only

Former Member
0 Likes
642

hi,

Sorry 4 that...

Rgds

Read only

Former Member
0 Likes
642

HI,

TRY PERFORM ...ENDFORM

Regards