Application Development 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: 

Selecting Views dynamically in MM03 - BDC

sivapuram_phanikumar
Active Participant
0 Kudos

Hi,

When i double click on a material in the report output, i have to display the purchasing view of the corresponding material. I did BDC for the same. But the issue is for some materials, Purchasing view is cominga at position 03 and for some other materials it is coming at some other positions. Is there any table, where i can find out which position purchasing view for a particular material exists?

Please help me in finding out this.

Best Regards,

Kumar

3 REPLIES 3

Former Member
0 Kudos

Hi,

Use the FM MATERIAL_BTCI_SELECTION_NEW and run with

MATERIAL

MATERIALART

SELECTION E

TCODE MM03

0 Kudos

This function module is not returing the view names that are available to a material. Instead it is giving the reference field name. Could you please suggest me how to get the field name related to purchasing view?

0 Kudos

Hi,

CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'

EXPORTING

material = wa_mara-matnr "Material to which char.values are attached

materialart = wa_mara-mtart "Material type

selection = 'D' "Give proper indicator tcode = 'MM03' "Transaction code

TABLES

btci_d0070 = it_bdcdata1 "Internal table from which position of MRP3 view can be found out

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.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

You can refer the MARA-PSTAT field.