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
I like to back up my mail on my MacBook Pro. Ever since I restored my sent e-mail messages on my iMac using its TM, I copy my mail folder on my MacBook Pro but the sent messages doesn't work on my MBP. I think that I know the cause is, on my external [More]
Purchased MLB via iTunes on 1 of my 3 appletv's. My oldest 2nd gen 720p shows "unable to load content" for all games , but my other 2 appletv's work fine, restarted problem appletv to no luck.  Also can't watch games on my ipad2 "unable to [More]
Hi I have had problems with PE4 giving the "premier elements.exe has stopped working message" about 75% of the way through burning a project to folder or DVD. I have followed all the advice on here, and followed advice from adobe technical suppo [More]
I have a simple request scoped bean with some simple validations in the associated form. Once I try to submit the form, with validation errors, the errors are correctly displayed, but all the properties I had already setted in the form are lost!..... [More]
My itunes has suddenly stopped oping when I plug my phone in and the check box for having it open automatically is grayed out.  Any ideas?Had the same problem. Do just as Chris said above, but before you quit iTunes click "Apply" in the lower ri [More]
I want to hide decimals in ALV report. I have written next code. WHEN 'EXI_PP'.         t_alv_fieldcat-col_pos   = 5.        t_alv_fieldcat-datatype  = 'QUAN'.         t_alv_fieldcat-decimals_out = 0.         t_alv_fieldcat-reptext_ddic = 'Exis. GT'. [More]
When I got my Touch a year ago I could have sworn for a while I would see the envelope icon in the header bar (where the time is) when new mail came in no matter what application I was in. That doesn't seem to happen anymore. Am I missing something? [More]
My iTunes crashes after 15 secondsHi jsteves, The article linked below details a number of troubleshooting steps that can help stabilize iTunes on your computer. iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues [More]
Hi, I built a gannt chart using dynamicXML built from PL/SQL. This chart shows only 1 colour (blue) even if I try to change the colours. There is an example (with fixed values) on my workspace POS_SCHULUNG user demo/demo and the application 56754 pag [More]
I had been using QuickTime Pro to produce Web Reference Movies and associated files. They seemed to work but thought they were having problems with the campus filewall under wifi but that might not be a problem after all. I finally worked out that Co [More]