Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

call transaction

Former Member
0 Likes
658

Hi,

I am having a requirement where in the report output a material number is displayed.

On clicking the material number it should take me to transaction MM03, MRP1 view.

I am able to call the transaction MM03 at line selection of the material. But it is not going to the MRP1 view.

How to achieve this?

Thanks,

Kumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
630

Hi,

Check this ,

SET PARAMETER ID 'MXX' FIELD 'D'.

call transaction 'MM03' AND SKIP FIRST SCREEN.

SELection = 'D'

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
630

Use the following syntax

CALL TRANSACTION USING <itab> OPTIONS FROM <opt>

Fill table <itab> structure BDCDATA, like if you were building a batch input (e.g. by using SHDB for a template), in <opt> set NOBIEND to 'X' to leave batch input mode after the end of BDC data.

(Look also at thread like )

Regards

Read only

Former Member
0 Likes
630

Hi Kumar,

Please try to make use of FM: MATERIAL_BTCI_SELECTION_NEW.

I hope below code can help you:



PARAMETERS: P_MATNR TYPE MATNR.

DATA: BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
DATA: BDCDATA1 TYPE TABLE OF BDCDATA.

START-OF-SELECTION.

PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0060'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_FIELD USING 'RMMG1-MATNR'
P_MATNR.

CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'
EXPORTING
MATERIAL = P_MATNR

MATERIALART = 'ROH' 
SELECTION = 'K' " --> Basic Data
TCODE = 'MM03'

IMPORTING 
SELSTATUS = 
SELSTATUS_IN = 
TABLES
BTCI_D0070 = BDCDATA1
EXCEPTIONS
MATERIAL_NOT_FOUND = 1
MATERIAL_NUMBER_MISSING = 2
MATERIAL_TYPE_MISSING = 3
MATERIAL_TYPE_NOT_FOUND = 4
NO_ACTIVE_DYNPRO_SELECTED = 5
NO_AUTHORITY = 6
OTHERS = 7.

APPEND LINES OF BDCDATA1 TO BDCDATA.
CALL TRANSACTION 'MM03' USING BDCDATA MODE 'E'.

----------------------------------------------------------------------

START NEW SCREEN * 
----------------------------------------------------------------------
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.

----------------------------------------------------------------------

INSERT FIELD * 
----------------------------------------------------------------------
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.

Read only

0 Likes
630

Hi Raj,

As you mentioned

CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'

EXPORTING

MATERIAL = P_MATNR

MATERIALART = 'ROH'

SELECTION = 'K' " --> Basic Data

The value of SELECTION for Basic data is 'K'.

What would be the value of SELECTION for MRP1 data?

Thanks,

Kumar

Read only

Former Member
0 Likes
631

Hi,

Check this ,

SET PARAMETER ID 'MXX' FIELD 'D'.

call transaction 'MM03' AND SKIP FIRST SCREEN.

SELection = 'D'

Read only

Former Member