Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Call Transaction Type M with Select-Option and Parameter

$
0
0

Hello Experts,

 

I currently have a program which displays an ALV report of Cost Collector Info.

I need to call KKF6N when a user double clicks on a row in the report with a

 

Select-Option for Material Number and a Parameter for the Plant Number.

 

I tried SUBMIT REPORT, but KKF6N's program (SAPMKOSA_46) is Type 'M' and can only be accessed through CALL TRANSACTION.

I tried shdb for bdc, but all of the selection fields are greyed out, not allowing for input.

 

I'm a bit of a novice, began working with SAP in January and would appreciate any help you could provide! So far, here's the relevant code I have:

 

TYPES: BEGIN OF order,
matnr TYPE afpo-matnr,       "Material Number
werks TYPE aufk-werks,       "Plant
...

END OF order.

DATA:  wa_orders TYPE STANDARD TABLE OF order.

 

FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
DATA: lv_order LIKE LINE OF wa_orders.
CASE r_ucomm.
  WHEN '&IC1'.
   READ TABLE wa_orders INDEX rs_selfield-tabindex INTO lv_order.
    IF sy-subrc = 0.
     SET PARAMETER ID: 'MAT' FIELD lv_order-matnr,
                                      'WRK' FIELD lv_order-werks.
     CALL TRANSACTION 'KKF6N'.
  ENDIF.
ENDCASE.
ENDFORM.

 

 

'MAT' seems to be take the value in, but does not display in the KKF6N selection-screen and the search on the info does not happen. Also, instead of the Material field normally having a select-option-like display (two input fields and a ->), it now only has a parameter-like display (one input field).

 

Thoughts?


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>