2019 Feb 23 10:08 AM
Hello !!
I am creating a ALV report now need to print it,so i create another smartforms . Now i want to call it from ALV report when print button is pressed. Please help me.
Hello !!
I am creating a ALV report now need to print it,so i create another smartforms . Now i want to call it from ALV report when print button is pressed. Please help me.
2019 Feb 23 10:10 AM
2019 Feb 23 12:01 PM
Hi,
Create one TABLE in smart form interface. Table should be the same table type (Same table type which you are getting from ALV).
Follow the link Click Here.. . I hope, It will be help full for you.
Regards,
Rupesh
2019 Feb 24 11:55 AM
2019 Feb 25 2:02 AM
Try this code:
DATA: l_funcion TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Name of Smartforms’
IMPORTING
fm_name = l_funcion
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.
IF sy-subrc = 0.
CALL FUNCTION l_funcion
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.Good Luck!
2019 Feb 25 10:54 AM
Steps
For more information, you should provide more information on how you built the ALV (tool) and which format you exepct for the generated spool.
2019 Feb 26 4:52 AM
I am adding a button and call pf_status. But it's not work. I'm sharing my code in the below ,if possible provide me the correct one.
SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = 'SUB_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
TABLES
t_outtab = lt_fgfinal
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
form sub_pf_status using RT_EXTAB TYPE slis_t_extab.
set PF-STATUS 'ZMM_PFSTATUS'.
ENDFORM.
form user_command USING r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
if r_ucomm eq '&PRINT'.
MESSAGE ' Print Button is pressed' type 'S'.
ENDIF.
ENDFORM.
2019 Feb 26 6:09 AM
what do you mean "not work", what do you experience, what do you expect?
2019 Feb 26 2:16 PM
2019 Feb 26 2:41 PM
Hello Sandra!!
Not work mean its not come in the Application toolbar. Actually I want to add a button, after pressing this smartforms is open.That's it.
Thanks for your co-operation.
2019 Feb 26 2:57 PM