cancel
Showing results for 
Search instead for 
Did you mean: 

function module: get/set paramter id

holger_hartung
Contributor
0 Kudos

Hi togehter,

i would like to use the activity task list in qm notification (behind is a function module) to start an other transaction. That works fine so far but i would us some paramter id's from the qm notification which should be set to the transaction which i will start with that function module.

But it dosent't work if i expected...

DATA: p_matnr like viqmel-matnr-

set Parameter id 'MAT' field p_matnr.

Call Transaction 'CA02'.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member221827
Active Participant
0 Kudos

Could you be more specific on what you're expecting to happen?  I'm guessing you want to go past the initial selection screen.  So something like:

    

     Call Transaction 'CA02' AND SKIP FIRST SCREEN.

You may want to be setting the parameters for Date (STT) and Plant (WRK) as well before calling the transaction.

holger_hartung
Contributor
0 Kudos

Hello,

but in first step i need to set the parameter id's from qm notification (material MAT and plant WRK) to transaction CA02 on the first screen. That dosen't work....

former_member221827
Active Participant
0 Kudos

Then I'll have to ask again my original question and ask could you could be more specific as to what you want to happen here?

I do believe calling with SKIP FIRST SCREEN will allow you to set the parameters first and then call the transaction with the values you already set MAT and WRK.  Have you tried it?

There is also the option of creating a bdc (batch input) to call the transaction with.  There's a lot of information about that through SCN Search.

holger_hartung
Contributor
0 Kudos

Hello,

I made some screenshots to give you more details with other transaction MMBE::

the function module in detaile:

After perform function module, there isn’t any value/parameter id from notification. It’s the same result with “…skip first screen”.

former_member221827
Active Participant
0 Kudos

Well you could try a bdc.   Here's an example that calls SE16N and fills in the table field with 'MARA'.  From there you could add an entry for okcode to whatever you want the transaction to do next.

*&---------------------------------------------------------------------*

*& Report  ZBDC_TEST

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

REPORT  ZBDC_TEST.

   DATA: tab TYPE SE16N_TAB value 'mara'.

   DATA: lt_bdc_data TYPE STANDARD TABLE OF bdcdata.

   datA: l_ctu_params type ctu_params.

   FIELD-SYMBOLS: <bdc> LIKE LINE OF lt_bdc_data.

       APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.

       <bdc>-program = 'SAPLSE16N'.

       <bdc>-dynpro = '0100'.

       <bdc>-dynbegin  = 'X'.

       <bdc>-fnam = ''.

       <bdc>-fval = ''.

       APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.

       <bdc>-program = ''.

       <bdc>-dynpro = ''.

       <bdc>-dynbegin  = ''.

       <bdc>-fnam = 'BDC_CURSOR'.

       <bdc>-fval = 'GD-TAB'.

       APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.

       <bdc>-program = ''.

       <bdc>-dynpro = ''.

       <bdc>-dynbegin  = ''.

       <bdc>-fnam = 'GD-TAB'.

       <bdc>-fval = tab.

*      APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.

*      <bdc>-program = ''.

*      <bdc>-dynpro = ''.

*      <bdc>-dynbegin  = ''.

*      <bdc>-fnam = 'BDC_OKCODE'.

*      <bdc>-fval = p_okcode.

       l_ctu_params-nobinpt = 'X'.

       l_ctu_params-dismode = 'E'.

       l_ctu_params-cattmode = ''.

       CALL TRANSACTION 'SE16N'

         USING lt_bdc_data

           OPTIONS FROM l_ctu_params.