2007 Feb 20 2:32 PM
Hi,
I have a problem in developing BDC for MM02. when recording, the selection of the view is recorded using an index number. if my list of material are having different views, then how the particular view is going to be selected and updated.
Thanks,
Amit
Hi,
I have a problem in developing BDC for MM02. when recording, the selection of the view is recorded using an index number. if my list of material are having different views, then how the particular view is going to be selected and updated.
Thanks,
Amit
2007 Feb 20 2:37 PM
Hi Amit,
You're facing one of the problems why you shouldn't use BDC... Try to use BAPIs when updating standard SAP data, in your case BAPI_MATERIAL_EDIT.
Regards,
John.
2007 Feb 20 2:40 PM
Hi Amit,
YOu have to dynamically find the index of the views that are possible for a particular material using the function module:
SELECTION_VIEWS_FIND
This function modules expects the value of mara-pstat.
Regards,
Ravi
2007 Feb 20 2:41 PM
But John, I still have to select the particular view to get to that screen prgrammatically or dont I?
How will the program determine which I am trying to update or is it going to update the field directly?
Thanks,
Amit
2007 Feb 20 2:56 PM
Hi Amit,
In case of BAPI, you need not have to worry about the View sequence... The fields get updated directly in the respective views.
For BDC, if the views are already defined in the SPRO and the sequence is not going to be changed, we can hardcode the required views. Just after entering material in MM02, the view list gets poped up. Here the sequence may change depending upon user auth. But if you select the first view always and go in to the basic view and then click on the list of views(appears at the end of all tabs). Now select your required view from the drop list. This is going to be constant for all the clients.
This way we can avoid the numbering confusion.
Thanks
2007 Feb 20 3:13 PM
Hi Amit,
One of the advantages of using BAPIs is you don't have to worry about selecting views; you just supply the data to the BAPI and all the rest is taken care of.
Unfortunately, the BAPI I gave in my first answer is of no use in this case. You can better use MATERIAL_MAINTAIN_DARK. Refer to the documentation of this FM in the system for supplying the parameters.
Regards,
John.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |