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: 

Update classification of batch

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

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

4 REPLIES 4

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try these BAPI and FM.

BAPI_OBJCL_CHANGE

BAPI_BATCH_CHANGE

VB_UPDATE_BATCH

Regards,

Ferry Lianto

Former Member
0 Kudos

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>

ferry_lianto
Active Contributor
0 Kudos

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

0 Kudos

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.