Quantity adjustment

hi,
against PO GRN was made for 140 qty, invoice and payment was done for 35 quantities.  Now the vendor would not supply the remaining quantities.  How to adjust it, since GR was raised for full qty.

Hi,
It is better to follow Purchase Return Procedure.
1. ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item)
2. MIGO - Goods Receipt > Purchase Order (Returns PO) (Here system will hit Mvmt type "161" and you can also select Un-restricted/blocked stock from where you want to return the stock)
3. MIRO - Credit memo w.r.t. Returns PO.

Similar Messages

  • No schedule line category could be determined during quantity adjustment

    Dear sir,
    i m getting this error while doing va31 plz helep me reagrding this  matter?
    error- No schedule line category could be determined during quantity adjustment.
    Regards,
    Debesh Tripathy
    Regards,
    Debesh Tripathy

    Hi,
    Go to IMG u2013 SD u2013 Sales u2013 Schedule Lines u2013 Assign schedule line categories.
    Over there check the assignment of your combination.
    Item category which is determined in scheduling agreement.
    Then MRP type which you have given in the material master data.
    So first note down these setting then check the combination of this setting in path given above.
    If there is no setting made then click on the new entry.
    Give the assignment of your combination and save it.
    Now try to create your document in the VA31 and check whether every thing runs fine or not.
    Regards
    Raj.

  • MIGO: Default quantity for subcontracting component

    According to OSS Note 329928, There is no component quantity adjustment in Transaction MIGO, except if you changed the quantity of the material produced for subcontracting before the first time it was opened.
    The quantities that you saw are no longer changed automatically.
    That causes a problem for us, because the people who updates materials just type in the quantity and don't verify if it goes correctly, so that is causing problems in the subcontracting process.
    We checked and there is no BAdI or exit to do that, so we understand that the only solution is to disable the option to expand the subcontracting components. Now the question is: How to do this? Is there any customizing option? Or we'll have to treat it in the BAdI? Or would be better in a screen exit?
    Thanks in advance!
    Rafael Schaffer

    Hi Rafael,
    Did you find any solution?
    We are having the same dificulty, but we need to control components quantity not only at MIGO but also at bapi BAPI_GOODSMVT_CREATE.
    Please share your solution!
    Thanks in advance,
    Carlos

  • Adjust qty of trackable sfc

    We are trying to increase the qty of a trackable sfc which has status done. Maintain Inventory does not allow it. It returns:
    Qty on hand cannot be greater than receive qty (Message 17315)
    Neither does SFC quantity adjustment. It retuns:
    SFC Quantity Adjustment is not possible; SFC status Done (Message 13882)
    Changing the status to in q, can be done with sfc step status, but after that we get a system error when we try to adjust the qty.
    An internal error occurred; contact technical support
    Any suggestions?
    Hans Freund

    Hi Hans,
    Both messages are quite expectable for your scenario but internal error is definitely not good.
    If you can increase Qty after putting SFC back in queue at an operation but for regular SFC (not trackable), then it can be either a bug or design gap.
    Thus I would say that this investigation will definitely require support ticket.
    Regards,
    Sergiy

  • How to call a "Z"module pool program in a "z"report

    Hi Guys,
    I have two reports .
    1. Report : uploads a tab delimited " .Txt1" file and update the "z1" table
        ".TXT1" : File contains 4 fields
    2. Module pool. :Uploads a a tab delimited " .Txt2" file and update another "z2" table
        ".TXT2" file contains  the 4 fileds of ".TXT1" and also 2 extra fields.
    I want to merge (call) the module pool program in the Report and perform the upload function using only one ".TXT" file.Please do guide me precisely .
    *Report:*
    REPORT zrswbgcs009 NO STANDARD PAGE HEADING MESSAGE-ID zwb
                         LINE-SIZE 185.
    TABLES:  zgcs_foc.      "FOC Parts Table
    *data count buffer
    DATA:    read_cnt(6)    TYPE p,        "Find read record
             update_cnt(6)  TYPE p,        "OK record
             error_cnt(6)   TYPE p.        "Error record
    *file buffer(FOC)
    DATA: BEGIN OF FOC_inrec  OCCURS  0,
            CUSTOMER(10),      "Customer
            PART_CODE(18),     "Parts Code
            REF_NO(35),        "Ref No.
            REF_DATE(10),      "Ref Date
            QTY(12),           "Parts Qty
            TEXT(100),         "Remark
          END OF FOC_inrec.
    *file buffer
    DATA: BEGIN OF inrec  OCCURS  0,
            CUSTOMER(10),      "Customer
            PART_CODE(18),     "Parts Code
            REF_NO(35),        "Ref No.
            REF_DATE(10),      "Ref Date
            QTY(12),           "Parts Qty
            PRICE(15),         "Parts Price
            WAERK(5),          "Parts Currency
            TEXT(100),         "Remark
          END OF inrec.
    DATA : v_file      LIKE rlgrap-filename.
    DATA gt_zgcs_foc LIKE zgcs_foc OCCURS 0 WITH HEADER LINE.
    DATA gs_zgcs_foc LIKE zgcs_foc.
    *File name ACCEPT--------------------------------------------------
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN  BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    *Company code
    PARAMETERS:  p_comp LIKE zgcs_imei-company OBLIGATORY.
    PARAMETERS:  pcfile LIKE rlgrap-filename OBLIGATORY LOWER CASE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS: HQfile  RADIOBUTTON GROUP b2.
    SELECTION-SCREEN COMMENT 7(20)  text-101 FOR FIELD HQfile.
    SELECTION-SCREEN POSITION 31.
    PARAMETERS: SUBfile RADIOBUTTON GROUP b2.
    SELECTION-SCREEN COMMENT 37(20) text-102 FOR FIELD SUBfile.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN  END   OF BLOCK b1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK box WITH FRAME.
    SELECTION-SCREEN: COMMENT /2(40) text-011, COMMENT  42(40) text-001,
                      ULINE,
                      COMMENT /2(40) text-012, COMMENT  42(40) text-002,
                      COMMENT /2(40) text-013, COMMENT  42(40) text-003,
                      COMMENT /2(40) text-014, COMMENT  42(40) text-004,
                      COMMENT /2(40) text-015, COMMENT  42(40) text-005,
                      COMMENT /2(40) text-016, COMMENT  42(40) text-006,
                      COMMENT /2(40) text-017, COMMENT  42(40) text-007,
                      COMMENT /2(40) text-018, COMMENT  42(40) text-008,
                                               COMMENT /42(40) text-009.
    SELECTION-SCREEN END OF BLOCK box.
    * -- AT SELECTION SCREEN ON
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pcfile.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename     = space
                def_path         = 'C:\'
                mask             = ',*.txt,*.TXT.'
                mode             = 'O'
                title            = ' '
           IMPORTING
                filename         = pcfile
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
    *-----------------------------start--------------------------------
    START-OF-SELECTION.
      CLEAR: read_cnt, update_cnt, error_cnt.
      REFRESH gt_zgcs_foc.        CLEAR gs_zgcs_foc.
      PERFORM file_upload_from_pc.
      SORT gt_zgcs_foc.
      DELETE ADJACENT DUPLICATES FROM gt_zgcs_foc
             COMPARING COMPANY CUSTOMER PART_CODE REF_NO REF_DATE.
    *// customer code check
      DATA: LT_ZESTD LIKE ZESTD OCCURS 0 WITH HEADER LINE.
      IF NOT gt_zgcs_foc[] IS INITIAL.
        SELECT COMPANY CUSTOMER CURRENCY
          INTO CORRESPONDING FIELDS OF TABLE LT_ZESTD
          FROM ZESTD
           FOR ALL ENTRIES IN gt_zgcs_foc
         WHERE COMPANY  = gt_zgcs_foc-COMPANY
           AND CUSTOMER = gt_zgcs_foc-CUSTOMER.
      ENDIF.
      SORT LT_ZESTD BY COMPANY CUSTOMER.
    *// part code check
      DATA: LT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
      IF NOT gt_zgcs_foc[] IS INITIAL.
        SELECT *
          INTO TABLE LT_MARA
          FROM MARA
           FOR ALL ENTRIES IN gt_zgcs_foc
         WHERE MATNR = gt_zgcs_foc-PART_CODE.
      ENDIF.
      SORT LT_MARA BY MATNR.
      LOOP AT gt_zgcs_foc.
    *// customer code check
        READ TABLE LT_ZESTD WITH KEY
                COMPANY  = gt_zgcs_foc-COMPANY
                CUSTOMER = gt_zgcs_foc-CUSTOMER.
        IF SY-SUBRC <> 0.
          WRITE:/'Invalid Customer code ',
             gt_zgcs_foc-COMPANY, ' ',
             gt_zgcs_foc-CUSTOMER.
          STOP.
        ENDIF.
    *// part code check
        READ TABLE LT_MARA WITH KEY MATNR = gt_zgcs_foc-PART_CODE
          BINARY SEARCH.
        IF SY-SUBRC <> 0.
          WRITE:/ 'Invalid part code ', gt_zgcs_foc-PART_CODE.
          STOP.
        ENDIF.
    *// REF_NO
        TRANSLATE gt_zgcs_foc-REF_NO     TO UPPER CASE.
        SHIFT gt_zgcs_foc-REF_NO     LEFT DELETING LEADING SPACE.
        IF gt_zgcs_foc-REF_NO = SPACE.
          WRITE:/'Ref No. is blank'.
          STOP.
        ENDIF.
    *// REF_DATE
        IF gt_zgcs_foc-REF_DATE = 0.
          WRITE:/'Invalid Ref Date'.
          STOP.
        ENDIF.
    *// QTY
    *    IF gt_zgcs_foc-QTY CO ' 0123456789'.
    *    ELSE.
    *      WRITE:/ gt_zgcs_foc-QTY, ' Invalid Qty value'.
    *      STOP.
    *    ENDIF.
      ENDLOOP.
    * Insert/Update table
    *  MODIFY zgcs_foc FROM TABLE gt_zgcs_foc.
      INSERT zgcs_foc FROM TABLE gt_zgcs_foc.
      IF sy-subrc EQ 0.
        COMMIT WORK.
        DESCRIBE TABLE gt_zgcs_foc LINES update_cnt.
        error_cnt = read_cnt - update_cnt.
      ELSE.
        ROLLBACK WORK.
        error_cnt = read_cnt - update_cnt.
      ENDIF.
      ULINE.
      FORMAT COLOR 3.
      WRITE: / 'Read count                :', read_cnt.
      WRITE: / 'Insert/Update count       :', update_cnt.
      WRITE: / 'Error count               :', error_cnt.
      FORMAT COLOR OFF.
    *end-of-selection--------------------------------------------------
    END-OF-SELECTION.
    *&      Form FILE_UPLOAD_FROM_PC
    FORM file_upload_from_pc.
      IF pcfile IS INITIAL.
        WRITE: / 'SELECT UPLOAD FILE !'.
      ELSE.
        MOVE pcfile TO v_file.
    * HQ file upload
        IF HQfile EQ 'X'.
          CALL FUNCTION 'WS_UPLOAD'
               EXPORTING
                    filename                = v_file
                    filetype                = 'DAT'
               TABLES
                    data_tab                = FOC_inrec
               EXCEPTIONS
                    conversion_error        = 1
                    file_open_error         = 2
                    file_read_error         = 3
                    invalid_type            = 4
                    no_batch                = 5
                    unknown_error           = 6
                    invalid_table_width     = 7
                    gui_refuse_filetransfer = 8
                    customer_error          = 9
                    OTHERS                  = 10.
          IF sy-subrc <> 0.
            WRITE: / 'FILE UPLOAD                :', sy-subrc.
          ENDIF.
          LOOP AT FOC_inrec.
            ADD 1 TO read_cnt.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = FOC_inrec-customer
                 importing
                      output = FOC_inrec-customer.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = FOC_inrec-part_code
                 importing
                      output = FOC_inrec-part_code.
            MOVE-CORRESPONDING FOC_inrec TO gs_zgcs_foc.
            MOVE p_comp          TO gs_zgcs_foc-company.
            MOVE gs_zgcs_foc-qty TO gs_zgcs_foc-balan.
            MOVE sy-uname        TO gs_zgcs_foc-ERNAM.
            MOVE sy-datum        TO gs_zgcs_foc-ERDAT.
            MOVE sy-UZEIT        TO gs_zgcs_foc-ERZET.
    * Source(1:HQ,2:SUB,0:Etc)
            MOVE '1'             TO gs_zgcs_foc-source.
            APPEND gs_zgcs_foc TO gt_zgcs_foc.
          ENDLOOP.
    * SGE file upload
        ELSE.
          CALL FUNCTION 'WS_UPLOAD'
               EXPORTING
                    filename                = v_file
                    filetype                = 'DAT'
               TABLES
                    data_tab                = inrec
               EXCEPTIONS
                    conversion_error        = 1
                    file_open_error         = 2
                    file_read_error         = 3
                    invalid_type            = 4
                    no_batch                = 5
                    unknown_error           = 6
                    invalid_table_width     = 7
                    gui_refuse_filetransfer = 8
                    customer_error          = 9
                    OTHERS                  = 10.
          IF sy-subrc <> 0.
            WRITE: / 'FILE UPLOAD                :', sy-subrc.
          ENDIF.
          LOOP AT inrec.
            ADD 1 TO read_cnt.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = inrec-customer
                 importing
                      output = inrec-customer.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = FOC_inrec-part_code
                 importing
                      output = FOC_inrec-part_code.
            MOVE-CORRESPONDING inrec TO gs_zgcs_foc.
            MOVE p_comp          TO gs_zgcs_foc-company.
            MOVE gs_zgcs_foc-qty TO gs_zgcs_foc-balan.
            MOVE sy-uname        TO gs_zgcs_foc-ERNAM.
            MOVE sy-datum        TO gs_zgcs_foc-ERDAT.
            MOVE sy-UZEIT        TO gs_zgcs_foc-ERZET.
    * Source(1:HQ,2:SUB,0:Etc)
            MOVE '2'             TO gs_zgcs_foc-source.
            APPEND gs_zgcs_foc TO gt_zgcs_foc.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.
    *MODULE POOL::*
    *& Module Name      : Warranty Bill
    *& Sub-Module       : W/B
    *& Description      : Parts Q'ty Adjust(Sales & Warranty)
    *& Program Name     : ZRSWBP004
    *& History
    *& Date             Author            Reason
    *& 2007.05.08       Song, Ji-Hyun     Initial Coding     Req.by WH.Song
    *& Logic Process
    *  - CONDITIONS
    *    Company, Customer, Material
    *  - PROCESS
    *    Display,Insert,Update data in the T/B ZESP04
    REPORT  zrswbp004 NO STANDARD PAGE HEADING
                      MESSAGE-ID 00
                      LINE-SIZE  250
                      LINE-COUNT 50.
    *               G L O B A L    V A R I A B L E S                       *
    TABLES : zesp04.
    DATA : BEGIN OF itab_list OCCURS 0,
            company       LIKE zesp04-company,
            customer      LIKE zesp04-customer,
            material      LIKE zesp04-material,
            adj_date      LIKE zesp04-adj_date,
            adjust        LIKE zesp04-adjust,
            reason        LIKE zesp04-reason,
            reason_code   LIKE zesp04-reason_code,
            doc_no        LIKE zesp04-doc_no,
            in_date       LIKE zesp04-in_date,
            create_id     LIKE zesp04-create_id,
          END OF itab_list.
    DATA : itab_upload LIKE TABLE OF zesp04 WITH HEADER LINE.
    DATA : s_mode(10).
    DATA : table_name(10) VALUE 'ZESP04'.
    DATA : tot_cnt TYPE i.
    DATA : ref_flag(1).
    *               M A C R O    D E F I N E                               *
    DEFINE conversion_kunnr.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = &1
           importing
                output = &1.
    END-OF-DEFINITION.
    DEFINE conversion_material.
      call function 'CONVERSION_EXIT_MATN1_INPUT'
           exporting
                input  = &1
           importing
                output = &1.
    END-OF-DEFINITION.
    *               S E L E C T I O N   S C R E E N                        *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME  TITLE title1.
    PARAMETERS     : company LIKE zesp04-company MEMORY ID buk MODIF ID v1
                     OBLIGATORY.
    SELECT-OPTIONS : customer   FOR zesp04-customer MEMORY ID kun
                                                    MODIF ID v1.
    SELECT-OPTIONS : material   FOR zesp04-material MEMORY ID mat
                                                    MODIF ID v1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 3.
    SELECTION-SCREEN COMMENT 3(12) text-002 MODIF ID v2.
    PARAMETERS : up_flag AS CHECKBOX MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(12) text-001 MODIF ID v2.
    PARAMETERS : p_fname(300) LOWER CASE MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME  TITLE title2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(53) text-003 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(10) text-004 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(12) text-005 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(12) text-006 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(15) text-007 MODIF ID v2.
    PARAMETERS : df1 TYPE c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 24(13) text-012 MODIF ID v2.
    PARAMETERS : df2 TYPE c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 41(11) text-013 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(14) text-008 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(11) text-009 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(14) text-010 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(10) text-011 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b2.
    INCLUDE zrswbp004_pbo.
    INCLUDE zrswbp004_pai.
    INITIALIZATION.
      title1 = ' Parts Quantity Adjustment '.
      title2 = ' Text File Layout '.
    *            S T A R T   O F   S E L E C T I O N                       *
    TOP-OF-PAGE.
      PERFORM write_header.
    TOP-OF-PAGE DURING LINE-SELECTION.
      PERFORM write_header.
    START-OF-SELECTION.
      IF up_flag = 'X'.
        PERFORM upload_data.
      ELSE.
        PERFORM select_data.
        SET PF-STATUS 'PF01' EXCLUDING 'SAVE'.
        PERFORM display_data.
      ENDIF.
    AT USER-COMMAND.
      PERFORM user_command.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      PERFORM get_filename.
    *&      Form  SELECT_DATA
    *       Select Data for Display
    FORM select_data.
      SELECT * FROM (table_name)
        INTO CORRESPONDING FIELDS OF TABLE itab_list
       WHERE company = company
         AND customer IN customer
         AND material IN material.
      CHECK sy-subrc <> 0.
      WRITE: 'No data found with your option.'.
    ENDFORM.                    " SELECT_DATA
    *&      Form  DISPLAY_DATA
    *       Display Data following Condition
    FORM display_data.
      LOOP AT itab_list.
        FORMAT COLOR 2 INTENSIFIED.
        WRITE : / '|' NO-GAP.
        WRITE :  (07) itab_list-company    CENTERED   NO-GAP, '|' NO-GAP,
                 (10) itab_list-customer   CENTERED   NO-GAP, '|' NO-GAP,
                 (20) itab_list-material   CENTERED   NO-GAP, '|' NO-GAP,
                 (10) itab_list-adj_date   CENTERED   NO-GAP, '|' NO-GAP,
                 (15) itab_list-adjust  RIGHT-JUSTIFIED  NO-GAP, '|'
    NO-GAP,
                 (55) itab_list-reason LEFT-JUSTIFIED NO-GAP, '|' NO-GAP,
                 (11) itab_list-reason_code CENTERED  NO-GAP, '|' NO-GAP,
                 (10) itab_list-doc_no      CENTERED  NO-GAP, '|' NO-GAP,
                 (10) itab_list-in_date  CENTERED   NO-GAP, '|' NO-GAP,
                 (12) itab_list-create_id  CENTERED   NO-GAP, '|' NO-GAP.
        FORMAT INTENSIFIED OFF.
        HIDE itab_list.
      ENDLOOP.
      WRITE : / sy-uline(171).
    ENDFORM.                    " DISPLAY_DATA
    *&      Form  WRITE_HEADER
    *       Write Report Header
    FORM write_header.
      DATA : line(1024).
      CLEAR line WITH '-'.
      DESCRIBE TABLE itab_list LINES tot_cnt.
      FORMAT INTENSIFIED ON.
      WRITE : 15 'Parts Quantity Adjustment'.
      SKIP.
      WRITE : / 'Total Count : ', tot_cnt.
      WRITE : /.
      WRITE : (171) sy-uline.
      WRITE : / '|' NO-GAP.
      WRITE : (07) 'Company'  CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'Customer' CENTERED   NO-GAP, '|' NO-GAP,
              (20) 'Material' CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'Adj. Date' CENTERED   NO-GAP, '|' NO-GAP,
              (15) 'Adjust' CENTERED   NO-GAP, '|' NO-GAP,
              (55) 'Reason' CENTERED   NO-GAP, '|' NO-GAP,
              (11) 'Reason Code' CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'Doc No' CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'IN DATE' CENTERED   NO-GAP, '|' NO-GAP,
              (12) 'CREATE ID' CENTERED   NO-GAP, '|' NO-GAP.
      WRITE : /(171) sy-uline.
      FORMAT INTENSIFIED OFF.
    ENDFORM.                    " WRITE_HEADER
    *&      Form  UPLOAD_DATA
    *       Data Upload from File
    FORM upload_data.
      DATA : l_filename LIKE rlgrap-filename,
             temp_dateformat TYPE dateformat.
      IF df1 = 'X'.
        temp_dateformat = 'YYYY.MM.DD'.
      ELSE.
        temp_dateformat = 'DD.MM.YYYY'.
      ENDIF.
      MOVE p_fname TO l_filename.
      CHECK l_filename NE space.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = l_filename
                filetype                = 'DAT'
                dat_d_format            = temp_dateformat
           TABLES
                data_tab                = itab_list
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9.
      IF sy-subrc NE 0.
        MESSAGE s000 WITH 'File upload is failed!'.
        STOP.
      ELSE.
        CLEAR : itab_upload, itab_upload[].
        LOOP AT itab_list.
          MOVE-CORRESPONDING itab_list TO itab_upload.
          conversion_kunnr    itab_upload-customer.
          conversion_material itab_upload-material.
          itab_upload-mandt     = sy-mandt.
          itab_upload-in_date   = sy-datum.
          itab_upload-create_id = sy-uname.
    *>>>>Insert by GSCHOI 2007.11.08
          IF itab_list-adj_date+0(6) NE sy-datum+0(6).
            MESSAGE i368 WITH 'Adjust month must same as current month!'.
            ROLLBACK WORK.
            STOP.
          ENDIF.
    *<<<<End
          APPEND itab_upload.
          INSERT INTO (table_name) VALUES itab_upload.
          IF sy-subrc EQ 0.
            CONTINUE.
          ELSEIF sy-subrc EQ 4.
            MESSAGE s368 WITH 'Duplicated Data Error!'.
            ROLLBACK WORK.
            STOP.
          ELSE.
            MESSAGE s368 WITH 'File Error!'.
            ROLLBACK WORK.
            STOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF sy-subrc EQ 0.
        MESSAGE s368 WITH 'Uploaded Successfully!'.
      ENDIF.
    ENDFORM.                    " UPLOAD_DATA
    *&      Form  USER_COMMAND
    *       User Command Execution in Screen 1000
    FORM user_command.
      MOVE-CORRESPONDING itab_list TO zesp04.
      CASE sy-ucomm.
        WHEN 'INSERT'.
          PERFORM insert_item.
        WHEN 'UPDATE'.
          PERFORM update_item.
        WHEN 'DISPLAY'.
          PERFORM display_item.
        WHEN 'REFRESH'.
          PERFORM refresh_list.
      ENDCASE.
      IF ref_flag = 'Y'.
        PERFORM refresh_list.
        CLEAR ref_flag.
      ENDIF.
    ENDFORM.                    " USER_COMMAND
    *&      Form  INSERT_ITEM
    *       When Clicking Insert Button
    FORM insert_item.
      CLEAR : s_mode.
      CLEAR : zesp04.
      s_mode = 'INSERT'.
      CALL SCREEN '100'.
    ENDFORM.                    " INSERT_ITEM
    *&      Form  UPDATE_ITEM
    *       When Clicking Update Button
    FORM update_item.
      CLEAR : s_mode.
      s_mode = 'UPDATE'.
      CALL SCREEN '100'.
    ENDFORM.                    " UPDATE_ITEM
    *&      Form  DISPLAY_ITEM
    *       When Clicking Display Button
    FORM display_item.
      CLEAR : s_mode.
      s_mode = 'DISPLAY'.
      CALL SCREEN '100'.
    ENDFORM.                    " DISPLAY_ITEM
    *&      Form  REFRESH_LIST
    *       When Clicking Refresh Button or Returning Display Screen
    FORM refresh_list.
      CLEAR : itab_list, itab_list[].
      PERFORM select_data.
      sy-lsind = sy-lsind - 1.
      PERFORM display_data.
    ENDFORM.                    " REFRESH_LIST
    *&      Form  GET_FILENAME
    *       Get Filename
    FORM get_filename.
      DATA: l_fname LIKE ibipparms-path .
      DATA : p_name LIKE sy-repid.
      p_name = sy-repid.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = p_name
                dynpro_number = sy-dynnr
                field_name    = ''
           IMPORTING
                file_name     = l_fname.
      p_fname = l_fname.
    ENDFORM.                    " GET_FILENAME
    Edited by: Matt on Nov 24, 2008 11:24 AM - surrounded the ABAP with  tags

    Hi,
        Use SUBMIT statement in your first Report zrswbgcs009 at the end, to call the Modulepool program zrswbp004.
    do a search in SDN you will get lot of threads on SUBMIT statement with selection screen.
    SUBMIT... [VIA SELECTION-SCREEN]
               [USING SELECTION-SET <var>]
               [WITH <sel> <criterion>]
               [WITH FREE SELECTIONS <freesel>]
               [WITH SELECTION-TABLE <rspar>].
    http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm
    Regards
    Bala Krishna

  • Error in creating schedule line aggrement through BAPI

    Hi All ,
    I want to create schedule line aggrement (VA31) by using BAPI / FM .
    I am using " SD_SALESDOCUMENT_CREATE" FM  .
    Here i am getting error in output when i enter shchedle line data in input .
    Error is given below .
    E V1                   434 No schedule line category could be determined during quantity adjustment
    Error only come when i want to create new schedule line ....in Changing any schedule line aggrement there is no error .
    I am able to create schedule line aggrement manually .
    please help .

    Use BAPI_SAG_CREATE

  • BAPI for creating sales scheduling agreement

    Hi All,
    I have a scenario where i need to create a sales scheduling agreement using VA31. I have tried using a function module "SD_SALESDOCUMENT_CREATE". I am able to create the document by inserting the correct data in "SALES_HEADER_IN", "SALES_ITEMS_IN", "SALES_PARTNERS" and using the update flag as " I ".
    When I try to insert data in "SALES_SCHEDULES_IN" the function module returns error message "No schedule line category could be determined during quantity adjustment".
    please provide help in finding out the right procedure for creating the scheduling agreement with schedule lines data.
    Regards.
    Anurag

    Hi,
    Did you shown this to your functional team.
    Regards,
    Madhu.
    Edited by: madhurao123 on Nov 21, 2011 3:29 PM

  • Third Party Sales Order

    Dear Guru's
    In Third Party Business Process  the vendor deliver the goods directly to customer.How we came to know that Did  the customer received the stock from vendor to company ie system. could anybody explain me in this Regard.
    Thank you
    Acquire

    Hi
    In third party there are 2 processes With shipping notification  and Without shipping notification
    1. With shipping notification means that the third party informs you that he has delivered the material your customer and you can raise the invoice to your customer based on this shipping notification without having received your bill from the third party vendor
    Shipping Notification
    When the vendor has sent the material to the customer, they will normally send you a shipping notification, which, amongst other things, contains the exact quantity of material sent. You have the possibility to enter this shipping notification into the system in the form of a dummy goods receipt. It will be posted directly in consumption so that no stocks are created. The quantity of goods received then updates the quantity to be invoiced in the sales order. Therefore, it is possible to create the customer invoice before you receive the incoming invoice from the vendor.
    Billing Documents
    The billing documents are created on the basis of the order. Since the vendor might not deliver the exact quantity ordered, quantity adjustment takes place via the shipping notification.
    Vendor Invoice Verification
    The vendor invoice verification can take place after billing. The variance in purchasing can be updated in Controlling using retroactive billing.
    ControllingThe revenue and costs will be posted to CO-PA using the billing document.
    Key Points
    The customer invoice can be created on the basis of the shipping notification before receiving the incoming invoice from the vendor.
    2. Without shipping notification means that the third party does not passes the information about the details to you , of the delivery of the material to your customer
    In this case you cant raise invoice to your customer till you receive the invoice from your third party vendor
    When you do MIRO of vendor invoice the system understands the goods has been delivered
    For further details check the link
    http://help.sap.com/bp_bblibrary/500/BBlibrary_start.htm  
    Reagrds
    Raja

  • Delete or change outbound delivery distributed to EWM.

    Hi gurus,
    I create an outbound delivery in ERP and it is sent to EWM, EWM activates it automaticaly. Then I decide to cancel (delete) the outbound delivery. Altough the status of oubound delivery order is "not started", when i try to change it using VL02N system does not allow to change it. Posts an error message " The delivery was distributed, meaning that processing occurs in another system. The report back has not yet been received.".
    What do you advice me to do.
    Regards.

    Hi,
    Please perform following steps
    Use process Code – “With Quantity Adjustment”. à O001 à  Enter – Quantity. (- Quantity)
    It will adjust the quantity back to Zero.
    Click on  " Outbound Delivery" icon at item level.
    It will create an outbound delivery in EWM and will close/update the Quantity and status in ECC.
    We can create a new delivery against original Sales order again in ECC and will be distributed to EWM.
    You need to click on that button  ( Outbound Delivery) to send a message to ERP. This is a PPF action, start condition is outbound delivery creation. This only happens when you click this button while delivery item has zero qty or post goods issue.
    Saby

  • Material Overhead at Production

    Hi friends
    i want to ask about material overheads that will be issued to production at the process execution ...assume that the machine needs 1 liter gas to produce 100 kgm for FP....how it will be handeled at Process Execution
    and i want issue spare parts to the production line for maintenance purposes ...adjust immediate is the solution ?
    Regards
    Amr Hussien

    Hi
    It will depend on the type of setups that have been done. I have been part of implementations where spares (MRO items) had been defined as a part of discrete and where adjusted using miscellaneous transactions. If you have defined the items as OPM item then you can use adjust immediate to reduce the cost. However, this would only be an quantity adjustment and the cost of FP would not be affected by this. You can accumulate this value into a control account and then allocate the same on FPs based on the certain forumlas (which can be disucssed with the customers).
    Regarding gas, ideal would be to make them a part of the formula if its definetly going to be issued and book it thru the production itself (items not adding to yield). However, if that is not possible then the above method can be used.
    The imlementations that I had worked on used inventory adjustments and then a csutomization to load these values as adjustments to costs based on the formulas/logic discussed with the customer
    Regards
    Girish

  • General Discussion - Best practice to manage Process order

    Hi Experts,
    Which is the best practice to manage process orders ?
    1. Quantity Change - I can make quantity adjustment in R3 and APO.
    2. Source Change - I can make a version change from order header . Also i can make a source change in APO by selecting a different PPM. Which is the best option.
    3. Re Read Master Data - Best practice to read master data is from R3 or APO ?
    I feel for all the above scenarios process ordes should always managed in R3. But still wondering why we have the same flexibility in APO too ?
    Can

    Hello,
    we are just migrating from 4.6c to ECC 6.0 and I have a couple of workflows to adopt.
    For background steps I defined in the corresponding BOR methods an exception to be fired when no result is available (e.g. no mail address available). Normally, I defined them as temporary errors.
    I activated in the WI outcome section the line for this exception and so the workflow processed this branch when the exception appeared. It worked fine.
    Now, in ECC 6.0, the same workflow get stuck in the WI. The exception is fired (I can see it in the log as "Error message"), but the WI is still in status "in process". It doesn't continue with the error outcome branch.
    Is this a new logic in ECC 6.0? Do you have any idea what to do? I used this logic some dozent times in different methods and workflows and it gives me a headache if I have to change everything ...
    Thank you!
    Best regards,
    Thomas

  • Come here and discuss the business process of Third Party Purchase Order?

    come here and discuss the business process of Third Party Purchase Order?
    when this po  is used and the following process is what?

    Hi YuLin
    It is a vague topic..anyways i will tell you one important scenario of the 3rd party order :Third Party Without Shipping Notification(its imp one)
    In third-party order processing, your company does not deliver the items requested by a customer. Instead, you pass the order along to a third-party vendor who then ships the goods directly to the customer and bills you.
    In this scenario, the vendor does not send a shipping notification. The incoming invoice from the vendor updates the billing quantity, so that the customer-billing document is only possible after entering the invoice from the vendor
    Function List
    The following functions are provided to support the Third Party Without Shipping Notification (J55) building block:
    When the order is created, the specification of material numbers, quantity and conditions takes place at item level. As the material is not available on stock, a purchase requisition is created directly within the sales order.
    Purchase Order Processing
    The purchase requisition can already be automatically assigned during creation. If not, it is possible to assign the purchase requisition manually. The purchase order is created with reference to the purchase requisition. The quantity and the material are transferred from the sales order. The purchase order price can now also be determined using condition records.
    Vendor Invoice Verification
    The vendor invoice verification must take place before customer billing. The quantity of the invoice updates the quantity to be invoiced in the sales order.
    Billing Documents
    The billing documents are carried out on the basis of the order. Since the vendor might not deliver the exact quantity ordered, quantity adjustment takes place through the quantity in the vendor's invoice.
    Controlling
    The revenue and costs will be posted to CO-PA via the billing document
    Key Points
    As no shipping notification is available, the customer invoice can only be created after having finished vendor invoice verification.
    Normal process you can refer in help.sap.com under this link
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b91d843ad11d189410000e829fbbd/frameset.htm
    regards
    Yogesh

  • Third party synth problem.

    Hi Folks:
    I am a Blind user of GarageBand on a MacBook Pro using Voiceover and I have installed both the Ivory 2 piano and the TruePianos software programs. For some reason, I am not able to access these pianos although I can access the stock instruments. If someone could help me to sort this out, I would appreciate it all over the place.
    Thanks gang.

    Dear Suddu,
    Quantity adjustment takes place via the shipping notification and the variance in purchasing can be updated in Controlling using retroactive billing
    <b>Order</b>
    When the order is created, the specification of material numbers, quantity and conditions takes place at item level. As the material is not available on stock, a purchase requisition is created directly within the sales order.
    <b>Purchase Order Processing</b>
    The purchase requisition can already be automatically assigned during creation. If not, it is possible to assign the purchase requisition manually. The purchase order is created with reference to the purchase requisition. Quantity and material are transferred from the sales order. The purchase order price can also now be determined via the condition records.
    <b>Shipping Notification</b>
    When the vendor has sent the material to the customer, they will normally send you a shipping notification, which, amongst other things, contains the exact quantity of material sent. You have the possibility to enter this shipping notification into the system in the form of a dummy goods receipt. It will be posted directly in consumption so that no stocks are created. The quantity of goods received then updates the quantity to be invoiced in the sales order. Therefore, it is possible to create the customer invoice before you receive the incoming invoice from the vendor.
    <b>Billing Documents</b>
    The billing documents are created on the basis of the order. <i><u>Since the vendor might not deliver the exact quantity ordered, quantity adjustment takes place via the shipping notification.</u></i>
    <b>Vendor Invoice Verification</b>
    The vendor invoice verification can take place after billing. <i><u>The variance in purchasing can be updated in Controlling using retroactive billing.</u></i>
    <b>Controlling</b>
    The revenue and costs will be posted to CO-PA using the billing document.
    Regards,
    Naveen.

  • Third party scenarios -- problem

    Hi Gurus
    In third party scenario.  The vendor supplies the material and if 
    1)by unfortunately goods get damaged before reaching to the client
    2)client identified some of the materials are poor in quality.
    In these scenarios what is the business process and how is this mapped in SAP
    I am having these scenarios please give your inputs...
    Thanks in advance
    Regards
    Suddu

    Dear Suddu,
    Quantity adjustment takes place via the shipping notification and the variance in purchasing can be updated in Controlling using retroactive billing
    <b>Order</b>
    When the order is created, the specification of material numbers, quantity and conditions takes place at item level. As the material is not available on stock, a purchase requisition is created directly within the sales order.
    <b>Purchase Order Processing</b>
    The purchase requisition can already be automatically assigned during creation. If not, it is possible to assign the purchase requisition manually. The purchase order is created with reference to the purchase requisition. Quantity and material are transferred from the sales order. The purchase order price can also now be determined via the condition records.
    <b>Shipping Notification</b>
    When the vendor has sent the material to the customer, they will normally send you a shipping notification, which, amongst other things, contains the exact quantity of material sent. You have the possibility to enter this shipping notification into the system in the form of a dummy goods receipt. It will be posted directly in consumption so that no stocks are created. The quantity of goods received then updates the quantity to be invoiced in the sales order. Therefore, it is possible to create the customer invoice before you receive the incoming invoice from the vendor.
    <b>Billing Documents</b>
    The billing documents are created on the basis of the order. <i><u>Since the vendor might not deliver the exact quantity ordered, quantity adjustment takes place via the shipping notification.</u></i>
    <b>Vendor Invoice Verification</b>
    The vendor invoice verification can take place after billing. <i><u>The variance in purchasing can be updated in Controlling using retroactive billing.</u></i>
    <b>Controlling</b>
    The revenue and costs will be posted to CO-PA using the billing document.
    Regards,
    Naveen.

  • BAPI for VA31

    Hi,
      I am using  SD_SALESDOCUMENT_CREATE  BAPI for create schedule agreement in (VA31).
      and i am facing the following issues.
      1. No schedule line category could be determined during quantity adjustment.
      2.The sales document is not yet complete: Edit data.
      3.Sales document was not changed.
      and i want to create schedules in Forecast schedules.
      How and where we can specify in the BAPI to create schedules in Forecast schedule mode.
      Thanks in advance.

    Hi,
    You are creating schedule agreement for existing  sales document or you are creating new sales document with schedule agreement
    If you are creating for all ready existing sales document  Use SD_SCHEDULECONF_MAP_TO_ATPC   function module , it may help you

Maybe you are looking for