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
This didn't happen before. I'm scanning some files with photoshop through WIA, then save them as grayscale tiffs. When I create a document (24 page print document A4 2 columns) or open an existing to make changes I can't import those newly created fi [More]
Hi We are facing problem in JNDI lookup inside the applet here is the scenario We have two weblogic servers(port 7001) one server is main server where the Applet1 , weblogic.jar and app.htm are in C:\bea\wlserver6.0sp1\config\mydomain\applications\De [More]
Hello, We had run TCode PRRW for some of the travel expenses. Due to some kernel problems the entires were not posted to FI even though accounting documents were generated. We rectified the kernel problem. Then we reversed PR05. This posted debit ent [More]
Wrong Parameters To use Print To Go, you must open an application, then select Print To Go as your printer. "can anyone tell me how to solve this problem" website addres Mohammed Alhajjajguys please help me...... Mohammed AlhajjajRead other 2 an [More]
Hi, I kow that I can edit graph scale values simply mouse clicking on them, and typing new values. Now I want to reproduce this behaviour programatically, but the problem is that I can't use the mouse in my application (only keyboard is available  ) [More]
Can you overcharge an iPhone? Shall I keep it in the charger when not in use? Thanks!You can not over charge the battery by leaving it plug in for long times.Read other 3 answers [More]
I am unable to switch on my IPad as it states that 'iPad is disabled'.  How do I fix this problem when I have no access to the iPad?  Any help or advice will be gratefully received.Forgotten Passcode or device disabled after entering wrong passcodeRe [More]
Photoshop CC can´t be started on Windows 7 Ultimate. The program is working quite Ok since i bought it but today it doesn´t start anymore. It crashes after the first popup screen with the message" "Photoshop coulnd´t be initialised due to a prog [More]
Hi all, I did forms personalzation based on global variables. When when i login for the first time untill and unless i validated the global variables the following error is displaying. Tokens in the string could not be evalated. please check the synt [More]
We have a WRT100 and having problems getting the mac to stay connected. No problems with a Dell laptop. 2 Sony PS3s, Tivo HD, but after a few minutes online the mac just loses connectivity. Any suggestions?I was having the same problem. This is what [More]