Skip to Content
avatar image
Former Member

help in smart forms

Hallow I new in smart form .i build a report program in abap and in my program I have to call to smart form .

In my program I select score of student in some course in If the student passed the course I have to send him page with his name (that I have in the program) and more data i have in my internal table .

Yhr_score_page is table that I take all the data for the student and score tab is my internal table with the data .

I wont to now how I move for example ename and orgeh to the smart form.

this is some code of my report program that i bring data of the student

SELECT objid_e objid_p

FROM yhr_score_page

INTO (wa_score_tab-objid_e , wa_score_tab-objid_p )

WHERE objid_e IN c_course

AND objid_p = pernr.

IF sy-subrc = 0.

APPEND wa_score_tab TO score_tab.

CLEAR wa_score_tab.

ENDIF.

ENDSELECT.

LOOP AT score_tab INTO wa_score_tab.

SELECT SINGLE ename orgeh werks

FROM pa0001

INTO (wa_score_tab-ename , wa_score_tab-orgeh , wa_score_tab-werks)

WHERE pernr = wa_score_tab-objid_p.

IF sy-subrc = 0.

MODIFY score_tab FROM wa_score_tab TRANSPORTING ename orgeh werks.

CLEAR wa_score_tab.

ENDIF.

ENDLOOP.

regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 22, 2007 at 08:38 AM

    Hi Antonio,

    First You must create the internal table for marks and other fields in the Smartform-FORM INTERFACE.. then use Text elements to display them.

    Once you activate the smartform, a function module gets generated. This function module will now have a tables parameter for the marks and some importing parameters for other fields.

    In your smartform driver program you have to pass that internal table and other fields to the smartform function module.

    Refer the sample programs:

    SF_EXAMPLE_01

    SF_EXAMPLE_02

    SF_EXAMPLE_03

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi,

      in text element to get wa_score_tab-ename

      Click on Field List On/Off button

      u will geta drop down

      if u have defined ur table in the Tables tab of FORM INTERFACE

      u can find ur table in Table Interface node,

      select ur table field, drag and drop it into the Text Element.

      hope this helps,

      priya.