‎2020 Sep 01 9:21 PM

I created alv report and also smartform now i need to call that smartform by alv report . When user mark checkbox for any doucument number and then execute in the alv output . it should call the smartform for that same document number . but my issue is that when i am selecting and then trying to execute nothing is happening . i think it is not calling smartform.
FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
CASE r_ucomm.
data: name1 type lfa1-NAME1 ,
wrbtr type bseg-WRBTR,
h_budat type bseg-H_BUDAT.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'Belnr'.
READ TABLE GI_final ASSIGNING <GWA_FINAL> INDEX rs_selfield-tabindex.
<GWA_FINAL>-CK = 'X'.
MODIFY table GI_FINAL FROM <GWA_FINAL> TRANSPORTING CK .
RS_SELFIELD-REFRESH = 'X'.
IF GI_FINAL IS INITIAL.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTEST_SB_SMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
IF FM_NAME IS NOT INITIAL.
CONTROL_PARAMETERS-preview = 'X'.
CONTROL_PARAMETERS-no_dialog = 'X'.
OUTPUT_OPTIONS-TDDEST = 'LP01'.
CALL FUNCTION FM_NAME "'/1BCDWB/SF00000009'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = CONTROL_PARAMETERS
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = OUTPUT_OPTIONS
USER_SETTINGS = 'X'
name1 = NAME1
h_budat = H_BUDAT
wrbtr = WRBTR
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
ENDIF.
*
ENDIF.
ENDCASE.
ENDFORM.
‎2020 Sep 02 7:00 AM
did you try to debut it to check, itf your FM have been called ?
‎2020 Sep 02 7:13 AM
May be check with your code line "CALL FUNCTION FM_NAME "'/1BCDWB/SF00000009'" is correctly working or not.
‎2020 Sep 02 8:04 AM
call function fm_name
..
user_settings = 'X'
..
first, check your user_settings/spool-settings with TC su01d tab Defaults or menu: System-User Profile-Own Data-Defaults
‎2020 Sep 02 7:53 PM
‎2020 Sep 02 8:31 AM
Did you just handled the &IC1 function code for detail display/double click ?
You should also handle the function code associated to your execute icon, loop in the internal table for selected records (select field not initial) and call the martforms FM in the loop. When no record currently selected, but the cursor is on a valid line, rs_selfield-tabindex not initial, consider execution of the smartforms for this line else raise an error 'no line selected'.
‎2020 Sep 02 10:36 AM
CALL FUNCTION FM_NAME "'/1BCDWB/SF00000009' this is working fine in smartform tcode but not calling in alv report
‎2020 Sep 02 11:07 AM
Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).
Example:
FORM USER_COMMAND
USING
r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
data: name1 type lfa1-NAME1 ,
wrbtr type bseg-WRBTR,
h_budat type bseg-H_BUDAT.
WHEN '&IC1'.
....(PS: don't put code between CASE and the first WHEN)
‎2020 Sep 02 8:39 PM
Add a breakpoint at the beginning of USER_COMMAND and tell us if it's called. If yes, then debug step by step and tell us what happens...