Skip to Content
Author's profile photo Sivasankar reddy Bojja

delivery Shipping condition copy as shipment shipping condition

dear all

Delivery  shipping condition copy  as shipment shipping  condition

go to SE38 – LXV56U15  here you find the include ZXV56U1  , you must  activate this include then you write below logic

DATA:

BEGIN OF l_last_data,

       vsbed

LIKE vttkvsbed,      “Shipping condition

*….

*Further data

END OF l_last_data,

BEGIN OF l_is_not_identical,

       vsbed LIKE rv56aselkz,     “Shipping condition

*….

*Further data

END OF l_is_not_identical,

     l_start_tabix LIKE sytabix,

     l_tabix LIKE sytabix.

*****************************************************************

* Analyse Data from deliveries

*****************************************************************

CLEAR: l_last_data, l_is_not_identical.

READ TABLE i_xvttp WITH KEY tknum = c_xvttktknum

BINARY      SEARCH.

l_start_tabix = sytabix.

IF sysubrc = 0.

LOOP AT i_xvttp FROM l_start_tabix.

     l_tabix = sytabix.

IF i_xvttptknum NE c_xvttktknum. EXIT. ENDIF.

READ TABLE i_xtrlk WITH KEY vbeln = i_xvttpvbeln

BINARY      SEARCH.

IF sysubrc = 0.

* Shipping condition

IF l_is_not_identicalvsbed IS INITIAL AND

NOT i_xtrlkvsbed IS INITIAL. “ignore initial entries

IF l_tabix = l_start_tabix.

           l_last_datavsbed = i_xtrlkvsbed.

ELSE.

IF l_last_datavsbed NE i_xtrlkvsbed.

             l_is_not_identicalvsbed = ‘X’.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

ENDIF.

******************************************************

* Are data identical in all deliveries ?

* Copy only in this case !

******************************************************

* Shipping condition

IF l_is_not_identicalvsbed IS INITIAL.

   c_xvttkvsbed = l_last_datavsbed.

ELSE.

*  MESSAGE ID ‘ZSD’ TYPE ‘I’ NUMBER 000.

message ‘Ship.Cond.not identical-Cannot copy ship.Cond.’ type ‘I’.


ENDIF.

once apply this , then create the shipment assign the delivery , then comes main screen click on planing then delivery shipping condition copy as a shipment shipping condition .

regards

sankar

Assigned tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Dear Bojja gee thanks for posting this but Could you say exactly what is the use of this i am failed to understand for what we are applying plz give business example

      Author's profile photo BOJJA SIVASANKAR REDDY
      BOJJA SIVASANKAR REDDY
      Blog Post Author

      HI VENU

      business process customer  pay the transportation amount to company , then company pay to vendor ,

      so user need  to know  when creation of shipment based on shipping condition , transportation amount payed direct  company or vendor , this purpose you copy the customer master shipping condition ( this  condition copy to order and delivery) as shipment shipping condition .

      regard

      sankar