Skip to Content
avatar image
Former Member

doubt in sap script

My internal table has 5 entries .

All these entries have to be output one by one in the form .

To be more clear , my internal table has the following five entries :-

1) Specific gravity

2) PH1

3) PH2

4) Crystalline powder

5) Black powder

Now how do I output this one by one on the form .

Is there a way by which I can include the loop statement in my sapscript code .

Please let me know about it. Soon

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 23, 2007 at 07:14 AM

    Hi,

    Each script is attached to a driver program. This program fetches the data and provides it to the script where it gets printed in the form you have defined in the form layout.

    After the data seletion, you call the form by 3 FM

    OPEN_FORM- is for opening a form

    WRITE_FORM- is for writing the data

    CLOSE_FORM- is for finally closing the form.

    loop at the internal table and call the WRITE_FORM FM inside the loop.

    LOOP AT ITAB.

    CALL 'WRITE_FORM'..................

    ENDLOOP.

    All the table entries will get printed with this.

    Hope this helps.

    Regards,

    Richa

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 23, 2007 at 10:16 AM

    hi,

    after getting the data into your internal table,

    u need to call the script function modules.here i am giving the function modules with the parameters u need to pass.

    <b>open_form</b>

    1) in exporting parameters u need to pass 'FORM'

    <b>write_form</b>

    1) write loop at your internal table bfore calling write_form

    then call write_form

    2) in export parameters

    1) element -


    >this element name is nothing but which u have defined in main window of your form (text element)

    2) function -


    > u can give 'SET'

    3) type -


    >'BODY'

    4) window -


    > 'MAIN'

    <b>close_form</b>

    u need not to do anything in this just

    call function close_form.

    try to impliment this code.it will work.

    Thanks,

    Madhukar

    Add comment
    10|10000 characters needed characters exceeded