09-20-2007 8:44 PM
I need to update the country of origin which is in the classification section of the batch. Is there a function module that does this?
09-20-2007 9:31 PM
Hi,
I never use the above BADI. But please try this in user exits EXIT_SAPMM06E_013 perhaps it may help.
DATA: BEGIN OF T_PTV OCCURS 0.
INCLUDE STRUCTURE EKPV.
DATA: UPDKZ,
LEDATA LIKE EKPV-LEDAT,
END OF T_PTV.
DATA : WA_TABLE(100) TYPE C,
WA_PTV LIKE T_PTV.
FIELD-SYMBOLS: <FS_PTV> TYPE ANY TABLE.
WA_TABLE = '(SAPLMEPO)PTV[]'.
ASSIGN (WA_TABLE) TO <FS_PTV>.
T_PTV[] = <FS_PTV>[].
LOOP AT T_PTV INTO WA_PTV FROM 1 TO 1.
WA_PTV-ROUTE = 'ZPT02'.
WA_PTV-VSTEL = '0303'.
WA_PTV-UPDKZ = 'U'.
WA_PTV-LEDATA = SY-DATUM.
MODIFY T_PTV FROM WA_PTV.
ENDLOOP.
<FS_PTV>[] = T_PTV[].
UNASSIGN <FS_PTV>.
Regards,
Ferry Lianto
09-20-2007 8:51 PM
Hi,
Please try these BAPI and FM.
BAPI_OBJCL_CHANGE
BAPI_BATCH_CHANGE
VB_UPDATE_BATCH
Regards,
Ferry Lianto
09-20-2007 9:21 PM
Ferry,
I know this is not part of the same topic but this is very critical issue for me and I have yet to resolve it. Would you know anything about this --
<i>I need to update vstel and route in PO and I think I can use BADI ME_BAPI_PO_CUST to do so. But I dont know how to use this badi. Can someone help me. i could not find the fields in it either. Thank you</i>
09-20-2007 9:31 PM
Hi,
I never use the above BADI. But please try this in user exits EXIT_SAPMM06E_013 perhaps it may help.
DATA: BEGIN OF T_PTV OCCURS 0.
INCLUDE STRUCTURE EKPV.
DATA: UPDKZ,
LEDATA LIKE EKPV-LEDAT,
END OF T_PTV.
DATA : WA_TABLE(100) TYPE C,
WA_PTV LIKE T_PTV.
FIELD-SYMBOLS: <FS_PTV> TYPE ANY TABLE.
WA_TABLE = '(SAPLMEPO)PTV[]'.
ASSIGN (WA_TABLE) TO <FS_PTV>.
T_PTV[] = <FS_PTV>[].
LOOP AT T_PTV INTO WA_PTV FROM 1 TO 1.
WA_PTV-ROUTE = 'ZPT02'.
WA_PTV-VSTEL = '0303'.
WA_PTV-UPDKZ = 'U'.
WA_PTV-LEDATA = SY-DATUM.
MODIFY T_PTV FROM WA_PTV.
ENDLOOP.
<FS_PTV>[] = T_PTV[].
UNASSIGN <FS_PTV>.
Regards,
Ferry Lianto
09-25-2007 12:23 AM
Hi Ferry
Thank you so much for your assistance. This code does work and now I am able to update the shipping point. However I do not understand what the code is doing. Can you explain to me why it works with field symbols and not without. Also how did you get the table name as (SAPLMEPO)PTV[] I tried to navigate around and was not able to figure it out. Once again, thank you very much for the solution.