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

SMARTFORM

Former Member
0 Likes
703

HOW TO RETRIEVE THE DATA FROM MULTIPLE TABLES IN SMART FORMS?

1 ACCEPTED SOLUTION
Read only

former_member283648
Participant
0 Likes
684

Hi,

You want to retrieve data inside smartforms? It is not advisable to do so. Because everytime you do some changes and activate the smartform, it will delete the underlying function module and recreate. So your code will also get regenerated eventhough you havent done any or very small change. But it is possible to add your code. For doing this you select the node in which u want to write code and then right click then go to the following path. CREAE->FLOW LOGIC->PROGRAM LINES. This u can do only in change mode.

6 REPLIES 6
Read only

former_member283648
Participant
0 Likes
685

Hi,

You want to retrieve data inside smartforms? It is not advisable to do so. Because everytime you do some changes and activate the smartform, it will delete the underlying function module and recreate. So your code will also get regenerated eventhough you havent done any or very small change. But it is possible to add your code. For doing this you select the node in which u want to write code and then right click then go to the following path. CREAE->FLOW LOGIC->PROGRAM LINES. This u can do only in change mode.

Read only

Former Member
0 Likes
684
  • Getting the function module name by form name

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YHR_TE_CADET'

IMPORTING

fm_name = work_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Calling the generated function module

CALL FUNCTION work_fm_name

EXPORTING

control_parameters = work_cont

user_settings = 'X'

general_data = wa_general

TABLES

lt_per_basic = lt_per_basic

lt_per_qual = lt_per_qual

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

'YHR_TE_CADET' - The name of your smartform.

Read only

Former Member
0 Likes
684

hi sunil

use program line option to get the different table data by using innerjoin statement.

regards

Usman

Read only

Former Member
0 Likes
684

hi

good

in the smartfrom when you r accessing data from the multiple internal table you have to declare all the internal table name and the fields in the form interface tab and you can use the select statement to access the data in the Type tab.

thanks

mrutyun^

Read only

0 Likes
684

HI..TANKS FOR UR RESPONSE..

wehre should we giv select statement either in smartformcode or in abap editor?

Read only

Former Member
0 Likes
684

hi

in smartforms right click in particuler window then >create>program line.

in this program line like that abap editor for smartforms.

Regards

usman