Skip to Content
avatar image
Former Member

regarding scripts

Hi buddies,

i am new to scripts...i am trying to display bulk data in the scripts

if we give customer number then it has to display order no , order date, order value ...

so how to define this....can any one give an example....

regards,

venu

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 10, 2007 at 09:23 AM

    Hi Venu,

    first u create the form.

    there from PAGES AND WINDOWS OPTION , PLACE THE CONTROL ON MAIN WINDOW->EDIT->TEXT ELMENTS.

    GOTO->CHANGE EDITOR

    THERE GIVE FOLLOWING.

    /E ELE1

    • &ITAB-VBELN&

    • &ITAB-ERDAT&

    • &ITAB-NETWR&.

    F3->SAVE AND ACTIVATE

    AND IN THE PRINT PROGRAM

    EXECUTE THE FOLLOWING CODE

    REPORT ZUSC.

    tables:vbak.

    parametrs:ordno for vbak-vbeln.

    data:begin of itab occurs 0,

    vbeln like vbak-vbeln,

    erdat like vbak-erdat,

    netwr like vbak-netwr,

    end of itab.

    CALL FUNCTION 'OPEN_FORM'

    EXPORTING

    FORM = 'form name '

    LANGUAGE = SY-LANGU.

    select vbeln erdat netwr from vbak into table itab where vben = ordno.

    loop at itab.

    CALL FUNCTION 'START_FORM'

    EXPORTING

    FORM = ' ' "GIVE U R FORM NAME ,LANGUAGE,START PAGE

    LANGUAGE = ' '

    STARTPAGE = ' '.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'ele1 ' (this one u have to give in mainwindow->edit->text elements)

    FUNCTION = 'SET'

    TYPE = 'BODY'

    WINDOW = 'MAIN'.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'ELE1 '

    FUNCTION = 'SET'

    TYPE = 'BODY'

    WINDOW = 'MAIN'.

    CALL FUNCTION 'END_FORM'.

    ENDLOOP.

    CALL FUNCTION 'CLOSE_FORM'.

    save,activate and execute

    I think it will useful for u.

    Reward points if useful.

    Thanks,

    Usha.

    Add comment
    10|10000 characters needed characters exceeded