2007 Oct 04 7:28 PM
Hi All,
I have an output screen and there is a hyperlink/ Hotspot on a particular field (say Material number). So I want to call Transaction MM03 with the material number clicked by the user.
1. I can't use <b>FM ABAP4_CALL_TRANSACTION</b> with the option STARTING NEW TASK because <b>Parameter ID</b> is not Maintained for the field (Hotspoted). So no value is passing to new transaction.
2. I already check through BDC. here also call transaction not able to create new session.
Please suggest any BAPI which can create new session with the Hotspot value and Parameter ID is not required.
Thanks in advance
2007 Oct 05 11:38 AM
Hi Anil,
Your 1st assumption is wrong... u <b>CAN</b> use FM ABAP4_CALL_TRANSACTION, u only have to add some data - use one of the FM's tables:
Look in tables of the FM, u'll find a table called USING_TAB (like bdcdata).
Create a table (let's call it itab) of the same structure in your program. Fill one line with these values:
itab-PROGRAM = 'SAPLMGMM' (this is the program for MM03)
itab-DYNPRO = '0060' (the number of the 1st screen if MM03)
itab-DYNBEGIN = 'X' (indicates for a beginning of transaction)
itab-FNAM = 'RMMG1-MATNR' (the screen field name of the mat.num. in MM03)
itab-FVAL = material number u get from the Hotspot field
All the values can be found through pressing F1 -> Technical Information on each field u want, in any transaction.
Now add itab in tables when calling the FM:
call function 'ABAP4_CALL_TRANSACTION'
exporting
tcode = 'MM03'
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
IMPORTING
SUBRC =
<b>TABLES
USING_TAB = itab</b>
SPAGPA_TAB =
MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
.
This will open another session with MM03 and the material number in the field.
Good luck...
Pls reward points.
Igal
2007 Oct 05 11:38 AM
Hi Anil,
Your 1st assumption is wrong... u <b>CAN</b> use FM ABAP4_CALL_TRANSACTION, u only have to add some data - use one of the FM's tables:
Look in tables of the FM, u'll find a table called USING_TAB (like bdcdata).
Create a table (let's call it itab) of the same structure in your program. Fill one line with these values:
itab-PROGRAM = 'SAPLMGMM' (this is the program for MM03)
itab-DYNPRO = '0060' (the number of the 1st screen if MM03)
itab-DYNBEGIN = 'X' (indicates for a beginning of transaction)
itab-FNAM = 'RMMG1-MATNR' (the screen field name of the mat.num. in MM03)
itab-FVAL = material number u get from the Hotspot field
All the values can be found through pressing F1 -> Technical Information on each field u want, in any transaction.
Now add itab in tables when calling the FM:
call function 'ABAP4_CALL_TRANSACTION'
exporting
tcode = 'MM03'
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
IMPORTING
SUBRC =
<b>TABLES
USING_TAB = itab</b>
SPAGPA_TAB =
MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
.
This will open another session with MM03 and the material number in the field.
Good luck...
Pls reward points.
Igal
2007 Oct 05 7:55 PM
Hi Igal,
Thanks a lots. its solved my problem..
I was missing the first table in TABLES.
thanks a lots