2015 May 18 11:28 AM
hello all,
we have a SMARTFORM requirement where,
in selection screen (Entry sheet number as input),
i need to display service entry sheet number and its details like below
my question is suppose if user enters some 10 entry sheet numbers,
i need to display entry sheet number1 and its details like above,
similarly on the next page i need to display entry sheet number2 and its details
like this i need to display, is it possible to do so,,,(for a single entry sheet i have done but guide me for multiple entry sheets)
thanks in advance....
2015 May 18 11:59 AM
Hi
it is possible. using control parameters you can do this.
first get the data in to one table(ex: gt_final), and write below code :
DATA : sf_name TYPE rs38l_fnam,
c_sel_cnt TYPE i,
c_sel TYPE i.
DATA: t_control_parameters TYPE ssfctrlop OCCURS 0 WITH HEADER LINE.
DATA : l_cntrl TYPE ssfctrlop.
DATA :t_control_compop TYPE ssfcompop OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'smartform'
IMPORTING
FM_NAME = GV_FORM_NAME.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF NOT GT_FINAL[] IS INITIAL.
SORT GT_FINAL BY service_entrysheet_no.
GT_FINAL1[] = GT_FINAL[].
DELETE ADJACENT DUPLICATES FROM GT_FINAL1 COMPARING service_entrysheet_no.
ENDIF.
DESCRIBE TABLE GT_FINAL1 LINES C_SEL.
LOOP AT GT_FINAL1 int wa_final1.
CLEAR GT_FINAL2.
REFRESH GT_FINAL2[].
GT_FINAL2[] = GT_FINAL[].
DELETE GT_FINAL2 WHERE service_entrysheet_no = wa_final1-service_entrysheet_no.
C_SEL_CNT = C_SEL_CNT + 1.
IF C_SEL EQ 1.
T_CONTROL_PARAMETERS-NO_OPEN = ' '.
T_CONTROL_PARAMETERS-NO_CLOSE = ' '.
* t_control_parameters-no_dialog = 'X'.
T_CONTROL_PARAMETERS-PREVIEW = 'X'.
APPEND T_CONTROL_PARAMETERS.
ELSE.
CASE C_SEL_CNT.
WHEN 1.
T_CONTROL_PARAMETERS-NO_OPEN = ' '.
T_CONTROL_PARAMETERS-NO_CLOSE = 'X'.
* t_control_parameters-no_dialog = 'X'.
T_CONTROL_PARAMETERS-PREVIEW = 'X'.
APPEND T_CONTROL_PARAMETERS.
WHEN C_SEL.
T_CONTROL_PARAMETERS-NO_OPEN = 'X'.
T_CONTROL_PARAMETERS-NO_CLOSE = ' '.
* t_control_parameters-no_dialog = 'X'.
T_CONTROL_PARAMETERS-PREVIEW = 'X'.
APPEND T_CONTROL_PARAMETERS.
WHEN OTHERS.
T_CONTROL_PARAMETERS-NO_OPEN = 'X'.
T_CONTROL_PARAMETERS-NO_CLOSE = 'X'.
* t_control_parameters-no_dialog = 'X'.
T_CONTROL_PARAMETERS-PREVIEW = 'X'.
APPEND T_CONTROL_PARAMETERS.
ENDCASE.
ENDIF.
CALL FUNCTION GV_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = T_CONTROL_PARAMETERS
* OUTPUT_OPTIONS = WA_COMPOSER_PARAM
* USER_SETTINGS = ''
TABLES
GT_FINAL = GT_FINAL2.
IF SY-SUBRC <> 0.
ENDIF.
ENDLOOP.
regards,
Chandu