2007 Mar 27 12:31 PM
Hi Gurus,
I have doubts on ABAP. Please clarify me in that.
1) What is the T-code for BADI
2) I have a sceneriao in ALV output I have to put one pushbutton for all the records and when we click on that button it has to execute the smartform. How can i do this sceneriao and what is the function module to trigger the smartform from the report?
Marks will be Awarded
Thanks
Ravi
2007 Mar 27 12:34 PM
HI,
1) SE18 - badi definition, se19 - badi implementation
2) Do you need to have buttons for each and every row in the alv grid or only one button on the toolbar? Smartform can be triggered using normal smartform function modules( like in driver programs ) when the button is pressed.
Thanks,
Rashmi.
Hi Gurus,
I have doubts on ABAP. Please clarify me in that.
1) What is the T-code for BADI
2) I have a sceneriao in ALV output I have to put one pushbutton for all the records and when we click on that button it has to execute the smartform. How can i do this sceneriao and what is the function module to trigger the smartform from the report?
Marks will be Awarded
Thanks
Ravi
2007 Mar 27 12:34 PM
HI,
1) SE18 - badi definition, se19 - badi implementation
2) Do you need to have buttons for each and every row in the alv grid or only one button on the toolbar? Smartform can be triggered using normal smartform function modules( like in driver programs ) when the button is pressed.
Thanks,
Rashmi.
2007 Mar 27 12:37 PM
hi
ur query will b better answered on "enhancements and modifications" forum.
go to tcode SPRO.
Click SAP Reference IMG.
then in appropriate area say (MM,SD etc) c the available business addin
please reward points if it helps...
if u ve created smartform and activated it, then in environment menu of form click on function module. there ull get function module name.
in ur print program(report) click on Pattern tab and select call function radio button.paste the function module name in it and enter..
ur form call will be displayed in abap editor with required import and export parameters
Message was edited by:
abapuser
2007 Mar 27 12:39 PM
Hi Ravi
The T codes for BADI are
se18 and se19.
For printing the smartform use the function module.
SSF_FUNCTION_MODULE_NAME
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
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.
Hope this helps !!!
Britto
2007 Mar 27 12:40 PM
Hi,
SE18 --> BADI defination
SE19 --> BADI Implementaion
<b>Calling SMARTFORMS from your ABAP program</b>
REPORT ZSMARTFORM.
* Calling SMARTFORMS from your ABAP program.
* Collecting all the table data in your program, and pass once to SMARTFORMS
* SMARTFORMS
* Declare your table type in :-
* Global Settings -> Form Interface
* Global Definintions -> Global Data
* Main Window -> Table -> DATA
*
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
* At the end of your program.
* Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
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.<b>Push button in ALV</b>
Regards
Sudheer
2007 Mar 27 1:03 PM
if u ve created smartform and activated it, then in environment menu of form click on function module. there ull get function module name.
in ur print program(report) click on Pattern tab and select call function radio button.paste the function module name in it and enter..
ur form call will be displayed in abap editor with required import and export parameters
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |