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

help in smart forms

Former Member
0 Likes
735

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 that I have in my program and if the student pass the course I send page 1

And if he didn't pass I send other page .

My problem is how I call to the smart from from my program and if I have to build 2 different smart forms .

SELECT objid_e objid_p objid_va objid_r objid_p objid_vc istat_p score weighting begda_e endda_e

FROM yhr_score_page

INTO (wa_score_tab-objid_e , wa_score_tab-objid_p , wa_score_tab-objid_va ,wa_score_tab-objid_r,

wa_score_tab-objid_p, wa_score_tab-objid_vc,wa_score_tab-istat_p,wa_score_tab-score,

wa_score_tab-weighting ,wa_score_tab-begda_e ,wa_score_tab-endda_e)

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.

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 ename to the smart form

I now that I have lot of question but I lost.

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
704

Hi,

When you create the smartforms..

In the GLOBAL SETTINGS -> FORM INTERFACE.

you can give the internal table name in the TABLES PARAMETER..

After activating the form..It will generate a function module...

Press f8 in the smartforms after activating..you will get the function module name..

Use the function module name to call from your print program..

CALL FUNCTION 'xxxxx'

EXPORTING

.................

TABLES

ITAB = ITAB_DATA[].

It is just like a function module call..

THanks,

Naren

6 REPLIES 6
Read only

Former Member
0 Likes
704

Hi,

You can still call one smartforms..

You can create two windows in the smartforms..

You can give conditions in the conditions tab of the window..

Give the condition V_PASS = 'X' in the pass window.

Give the condition V_PASS = ' ' in the did not pass window..

THanks,

Naren

Read only

0 Likes
704

hi Narendran

thankes for that qustion

my other 2 qustion is:

1) how can i get the name and score from my program how i decare it in the smart form (how i export the data from my internal table to the smart form)

2) how i call to the smart from from my program

hope u can help

regards

Read only

Former Member
0 Likes
705

Hi,

When you create the smartforms..

In the GLOBAL SETTINGS -> FORM INTERFACE.

you can give the internal table name in the TABLES PARAMETER..

After activating the form..It will generate a function module...

Press f8 in the smartforms after activating..you will get the function module name..

Use the function module name to call from your print program..

CALL FUNCTION 'xxxxx'

EXPORTING

.................

TABLES

ITAB = ITAB_DATA[].

It is just like a function module call..

THanks,

Naren

Read only

0 Likes
704

Hi

For getting function module generated by smart form use

SSF_FUNCTION_MODULE_NAME function module by passing smart form name to this function module, you will get function module generated by smart form.

Cheers

Raju

Read only

0 Likes
704

hi Narendran

how can i bring the name of student for the smart form page

i have to declare all the field of my internal table in FORM INTERFACE or just the internal table?

Read only

Former Member
0 Likes
704

select single * from stxh client specified

where mandt = client

and tdobject = object

and tdname = name

and tdid = id

and tdspras = language.

if sy-subrc > 0.

write language to l_language(2).

call function 'SAPSCRIPT_MESSAGE_DEF'

exporting no = 600

v1 = name

v2 = id

v3 = l_language.

message e600 with name id language raising not_found.

Above statements are in the function module "Read_text". Iam comparing all the fields with my fields(client,object,name,id,language) , all are matching except "name". This record(name) is not there in the table STXH. So i want to add record(name) to this table. What is the procedure?

Thanks in advance.

Narmda Sree