06-06-2008 7:34 AM
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
06-06-2008 7:49 AM
Hi,
Use the FM MATERIAL_BTCI_SELECTION_NEW and run with
MATERIAL
MATERIALART
SELECTION E
TCODE MM03
06-06-2008 9:59 AM
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?
06-06-2008 10:02 AM
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.