Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3353

BAPI_GOODSMVT_CREATE

$
0
0

Hello Evreyone


I have the following requirments


A)     Program must find the corresponding Purchase Order for the S/O items selected via the Account Assignment in Purchasing Document table

 

Get EKKN-EBELN and EKKN-EBELP where

 

VBAP-PSTYV= YTAS

EKKN-VBELN = VBAP-VBELN (from result screen) and 

EKKN-VBELP = VBAP-POSNR (from result screen)

 

B)     Check if PO item is still open and has not been received

 

            If EKET-WEMNG = “0”

                  Where EKET-EBELN = EKKN-EBELN

                  And EKET-EBELP = EKKN-VBELP

 

If true then proceed, else provide error message: “PO item has been received, cannot flip order”

 

Program must find the component batches from the purchase order found in step 1 that needs to be updated

 

            Get RESB-MATNR, RESB-CHARG, RESB-LIFNR where

 

                        RESB-EBELN = EKKN-EBELN and

                        RESB-EBELP = EKKN- EBELP

 

C) Perform a Movement type 562O using BAPI_GOODSMVT_CREATE

 

Where MATERIAL = RESB-MATNR

      BATCH = RESB-CHARG

      QTY= RESB-BDMNG

      VENDOR = RESB-LIFNR

 

D) Change batch valuation type (MCHA-BWTAR) base on the following logic:

 

Get VBAP-MATNR, VBAP-BWTAR, VBAP-WERKS and VBAP-CHARG where

 

        VBAP-VBELN = (from result screen)

        VBAP-UEPOS = VBAP-POSNR (from parts selected)

        VBAP-PSTYV= “YEXR”

 

Then go to table ZPWCS_REPAIRFLIP (CU60)

 

Get PWCS_COMP value when PWCS_YEXR = VBAP-BWTAR

Update MCHA-BWTAR

 

E) Change vendor (MCHA-LIFNR) and vendor batch (MCHA-LICHA) to value found in part sold on YEXR sales order line item using BAPI_BATCH_CHANGE

           

            Get MCHA-LIFNR and MCHA-LICHA where

 

                   MCHA-MATNR = VBAP-MATNR (step 3.2)

                   MCHA-CHARG = VBAP-CHARG (step 3.2)

                   MCHA-WERKS = VBAP-WERKS (step 3.2)

 

            Update MCHA-LIFNR and MCHA-LICHA with value found.

 

F) Perform movement 561O to put the part back at vendor using BAPI_GOODSMVT_CREATE

 

Use information from step 3.1

 

            Upon completion, provide regular SAP messages


I have these requirements everyone. How do i go ahead with these. Am very new to ABAP. Please help.


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>