cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete an element in the main window at end of the main window.?

Former Member
0 Kudos

Hi friends,

I need to delete underline only before main window ends in a page.

I am calling 'Underline' element in mainwindow after every loop operation using 'write form' FM.

After displaying certain data the underline element is called and lines are displayed.

Now i dont want to print the underline at the end of the window in that particular page.

I just need a statement which will satisfy this condition.

Hope you guys got my question...

Regards,

Navaneeth.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

I think you can use subroutines for the same.

Check the condition total number of pages in the script and use a perform statement and set a flag inside the driver program. Now call the element in the driver program using that flag variable.

see the below code

/: PERFORM ABC IN PROGRAM ZABC USING &SAPSCRIPT-FORMPAGES(C)&
/: ENDFORM

In the driver program define the form and check the formpages if it is greater than 1 then call the function module write_form using the underline element.

In driver program.

if sapscript-formpages > 1. " write this inside the form endform using the itcsy structure
flag = 'X'.
endif.
if flag = 'X'.
call function 'WRITE_FORM'.
endif.

This is one possible way as i see.

check the link for subroutines in scripts

[Subroutines in SAPScripts|http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm]

Regards

Sarves

Edited by: Sarves Sombhatla on Sep 22, 2009 2:35 PM