Sitemap

Amicuk Programming Answers

Regarding Goods Reversal and Goods Issue process for Production orders

2015-10-11   Views:1

Advertisement

Hi, I have a issue regarding <b>Goods Reversal</b> and <b>Goods Issue</b> process for <b>Production orders</b>. Actually I am having a Z - Function Module in that i am passing <b>production order number other deta

Hi,
I have a issue regarding <b>Goods Reversal</b> and <b>Goods Issue</b> process for <b>Production orders</b>.
Actually I am having a Z - Function Module in that i am passing <b>production order number other details</b> to
make the <b>Goods Reversal</b> happen.
The code for the above is as below:
                   i_mvtit-material      = wa_mdfa-matnr.
                    i_mvtit-plant         = i_resb-werks.
                    i_mvtit-spec_stock    = 'Q'.          "New
                    i_mvtit-stge_loc      = 'ZWIP'.
                    i_mvtit-stge_type     = i_resb-lgtyp. "New
                    i_mvtit-batch         = i_resb-charg. "New
                    i_mvtit-orderid       = i_resb-aufnr.
                    i_mvtit-spec_stock    = i_resb-sobkz.
                    i_mvtit-entry_qnt     = i_resb-enmng.
                    i_mvtit-entry_uom     = i_resb-erfme.
                    i_mvtit-entry_uom_iso = i_resb-meins. "New
                    i_mvtit-wbs_elem      = v_frwbs.
                    i_mvtit-move_type     = '262'.
                    i_mvtit-xstob         = 'X'.
                    i_mvtit-gr_rcpt       = i_resb-aufnr. "New
                    i_mvtit-reserv_no     = i_resb-rsnum.
                    i_mvtit-res_item      = i_resb-rspos.
                    APPEND i_mvtit.
* HEADER ELEMENTS
                    k_gmvt_code-gm_code    = '03'.
                    k_gmvt_head-pstng_date = sy-datum.
                    k_gmvt_head-doc_date   = sy-datum.
* CREATE GOODS MOVEMENTS
                    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
                      EXPORTING
                        goodsmvt_header = k_gmvt_head
                        goodsmvt_code   = k_gmvt_code
                      TABLES
                        goodsmvt_item   = i_mvtit
                        return          = i_return.
The Above code does the <b>Goods Reversal</b> but then i will update one Z Table with fields like
Production Order Number[AUFNR], Number of Reservation[RSNUM], Item Number of Reservation [RSPOS], Material Number [MATNR], Requirement Quantity [BDMNG], WBS element[PSPNR] etc. If Above BAPI runs sucessfully.
That is happening correctly.
But Then actual issue is i have do <b>Goods Issue</b> for those Z-Table records.
There i will give Production order Number's & Storage Location in Selection-Criteria.
Then i need to do <b>Goods Issue</b> for that order.
The code i had written as follows.
* POPULATE VALUES FOR BAPI CALL
        i_mvtit-material      = i_zpsi7603_01-matnr.
        i_mvtit-plant         = i_resb-werks.
        i_mvtit-spec_stock    = 'Q'.                "New
        i_mvtit-stge_loc      = p_sloc.
        i_mvtit-stge_type     = i_resb-lgtyp.       "New
        i_mvtit-batch         = i_resb-charg.
        i_mvtit-orderid       = i_resb-aufnr.
        i_mvtit-spec_stock    = i_resb-sobkz.
        i_mvtit-entry_qnt     = i_resb-enmng.
        i_mvtit-entry_uom     = i_resb-erfme.
        i_mvtit-entry_uom_iso = i_resb-meins.       "New
        i_mvtit-wbs_elem      = v_frwbs.
        i_mvtit-move_type     = c_261.
        i_mvtit-mvt_ind       = 'F'.                "New
        i_mvtit-xstob         = c_x.
        i_mvtit-gr_rcpt       = i_resb-aufnr.       "New
        i_mvtit-reserv_no     = i_resb-rsnum.
        i_mvtit-res_item      = i_resb-rspos.
        APPEND i_mvtit.
* HEADER ELEMENTS
        k_gmvt_code-gm_code    = c_03.
        k_gmvt_head-pstng_date = sy-datum.
        k_gmvt_head-doc_date   = sy-datum.
* CREATE GOODS MOVEMENTS
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header = k_gmvt_head
            goodsmvt_code   = k_gmvt_code
          TABLES
            goodsmvt_item   = i_mvtit
            return          = i_return.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.
        READ TABLE i_return INDEX 1.
        IF i_return-type EQ c_s.
          DELETE FROM zpsi7603_01 WHERE aufnr = i_resb-aufnr AND
                                        rsnum = i_resb-rsnum AND
                                        rspos = i_resb-rspos.
        ENDIF.
If i run above code for <b>Goods Issue</b> it is giving error can anybody tell me what changes i need to do to make it work.
The <b>Error Message</b> i am getting is as below:
<b>Qty and / or "delivery completed" ind. or final issue ind. are missing</b>
<b>Error Number for the above is : 264.</b>
Can anybody solve my issue.
Any help will be appreciated.
Thanks in advance.
Thanks & Regards,
Rayeez.

The replay answer
Advertisement
Hi,
Thanks boss.
It is working now correctly.
The issue is the  i_mvtit-XSTOB should be equal space in case of Goods issue while incase of Reversal it should be equal to X.
Thanks for ur efforts.
I had awarded you points.
Thanks a lot.
Thanks & Regards,
Rayeez.

Go to See the other 5 answers

Regarding Goods Reversal and Goods Issue process for Production orders

Category:DefaultRelease time:2015-10-11Views:130

Hi, I have a issue regarding <b>Goods Reversal</b> and <b>Goods Issue</b> process for <b>Production orders</b>. Actually I am having a Z - Function Module in that i am passing <b>production order number other deta[More]

Mass reversal of one component issued  to many production orders

Category:DefaultRelease time:-0001-11-30Views:130

Hello SAP GURUS One of the common component is issued  to many production orders from wrong storage location ie instead of 0002  storage location it got issued from storage location0001, Is there any way to mass reverse of this common component  that[More]

Issue with printing production order after changes through CO02

Category:DefaultRelease time:2015-10-11Views:130

Hi, Currently I have one issue with printing production order changes through CO02. If I go for print, all the operations are captured in printout. But after the print, if I add any new operations to this production order, and then go for print, its[More]

External subcontracting processing in production orders

Category:DefaultRelease time:-0001-11-30Views:130

Hi Everybody, We are facing a following situation...while using external subcontracting processing in production orders.. Finance wants all costs settled off of production orders with receipts against them at period end to accurately capture costs fo[More]

Goods Issue (MB1A) for production order - no stock reduce happening in WM

Category:DefaultRelease time:2015-10-11Views:130

Hi, I try to do a Goods Issue with transaction MB1A for a production order, but no stock reduces happens within WM (HUM). I did the following. Created a Production order - CO01 Created a TR - LB01 - (assigned production order to the TR) Created a HU[More]

Process in production order

Category:DefaultRelease time:-0001-11-30Views:130

What is the process for the Production Order?Hi, Step 1: Material Master Logistics > Production > Master Data > Material Master > Material > Create General > Immediately MM01 Step 2: BOM creation Logistics > Production > Master Dat[More]

Waiver process during Production order

Category:DefaultRelease time:-0001-11-30Views:130

Hi, My client has a requirement whic is called as waiver process, whereby a part could be replaced by another alternative part during production order process, however the whole process need to be integrated with ECM and workflow for seemless communi[More]

System status for IDOC creation and processing for production orders

Category:DefaultRelease time:2015-10-11Views:130

All I am creating IDOCs for production orders to send requirements to an external WM system for kitting execution. I need to know whether there are any system statuses to notify me when an IDOC has been created,failed and processed. If not, how do I[More]

Error while issue material against production order

Category:DefaultRelease time:2015-10-11Views:130

Hi,   In our development server recently we have created on ecompnay code and plant by copying the one existing company code and plant,  now for this new plant I have created new profit center with KE51  and after that I have create done cost ceneter[More]

SUBCONTRACT PROCESSING AGAINST PRODUCTION ORDER

Category:DefaultRelease time:-0001-11-30Views:130

DEAR GURUS, SCENARIO - PRODUCTION ORDER HAS 10 OPERATIONS OUT OF WHICH OPERATION 10 TO 20 - IN HOUSE 20 TO 40 - EXTERNAL 40 TO 50 - IN HOUSE 60 - EXTERNAL 70 TO 100 IN HOUSE.  PLEASE LET ME KNOW THE ENTIRE PROCESS WITH REGARD TO CREATION OF BOM, SUBC[More]

Mass change final issue indicator in production order

Category:DefaultRelease time:-0001-11-30Views:130

Hi Is there any report can show final issue indicator for all production order? How can I mass change the indicator?Hi,   In reports such as COOIS and COHV you can select in the initial screen "List: Components" and check your "Change layou[More]

Hot
Hello Gurus, Recently we have upgraded from 4.7 to ECC. While upgrading we were used one Z program to download the objects from 4.7 and used Z program to upload the objects into ECC. Now we are planning to integrate Z program of 4.7 and Z program of [More]
This website www.colonialstock.com does not display the spry menubar correctly.  I need it to go all the way to the right.  But when I do a view on IE8 or do the compatibility view on IE9 (which is the same as IE8) it brings the bar too far, making i [More]
Here is the error message I receive after trying to reinstall iTunes 10.5 iTunes was not correctly installed. Please reinstall iTunes. Error 7 (Windows error 127). The procedure entry point CFHTTPCookieCopyValue could not be located in the dynamic li [More]
Hi, Is there aby way to add new line character fir string message in soap body for text message output. like <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">string,3\nstring,3\n</soapenv:Body> whic is not work [More]
Can I stream visual to my TV using apple TV and sound to wifi speakers at the same time. This is easy for itunes, but for browser stuff like iplayer can this be done?airfoil will play any audio from the computer to all devices which support airplay w [More]
Today I tried to install the two updates that apple had in store for me: IPhoto Thunderbolt The installer asked me to reboot and I said yes. After a while, the installer said:   None of the updates could be installed. I pressed the only button: resta [More]
hello, when I setting color for particular table cell, it sets. but, when I click another row (another cell) , the color of the previous cell disabled and it visible only when I click that cells row. how can I permanatly set the color for the rows de [More]
I have Windows 7 Hone Premium and WMP 12.  My library is completely jacked up.  I keep getting duplicate files every time I open it, and some files have completely disappeared.  What's the deal?  Is there an easy way do delete duplicate files?  Any w [More]
hi Here is my html file <html> <body> <applet codebase = "Coorclasses/" code = "CoordinateConverterApplet.class" archive = "FITSWCS.jar" width=380 height=400></applet> </body> </html> It wo [More]
Hello, I Have generated a Java Proxy. And the Data Source is a JDBC Table like: VALUE01--VALUE02--VALUE03 ROW1-Test1----Test1----Test1 ROW2-Test2----Test2----Test2 Now i can set the Datatypes in XI Proxy with TYPE.setVALUE01("Test1"); TYPE.setVA [More]