Change data ITEM in MIGO

Hi guys, i have to change a quantity in a item when I post the reserve in MIGO.
For example, I have a reserve for 100 UNI of the material A, Nro.Reserv: 90000
Then, I go to a transaction MIGO and I select "Good Issue" and the system, by default, set 100 UNI into a quantity item, but I want to set 30 UNI, I used the BADI MB_MIGO_ITEM_BADI but this BADI only allows me modified the fields: store location and text item, I hope you help me ... thanks
PD: Sry for my bad english

Hi David,
Use the BADI "MB_MIGO_BADI" -> Method "LINE_MODIFY".
You can update the field MENGE(Quantity) in the structure CS_GOITEM.
Regards
Vinod

Similar Messages

  • MIGO Changing several items on migo

    Hi everybody,
    I would like to add automatically batches in sub-items on MIGO.
    Does i have to use BADI or USER EXIT?
    Is there anybody that can tell me how to find a table with all items from Migo?
    Thank you for your reply.

    Hello, Vivek
    My requirement is as follows:
    1 - We are implementing SAP for MILL products in a Cable Industry company;
    2 - We use MIGO for goods reception of reels of cable, the cable being the material that will subject to goods movement;
    3 - Each item is a different reel of cable. For each item, we must enter in the batch configuration the material code and batch of the reel (the reels are also materials). The configuration values are kept by MIGO in the GOITEM structure, on special /SAPMP/ append fields (max 10 characteristics);
    The validation that must be made is this:
    4 - We have to be sure that every batch of cable has a different reel in its configuration data. For that, we need to check all the item lines for the material code/batch entered in the configuration;
    5 - If we find that the same reel (material/batch) has been entered in more than one item's configuration, a message has to be displayed;
    Regards,
    Joao

  • Sales Order creation/ change date for the items

    I have a unique scenario and i need to get a Report for this
    A sales order is created for 4 line items.
    Out of these , for 2 line items a delivery is created. I need the sales order creation date and time  for these 2 items in a custom report
    Now the other 2 items go in to some kind of block- Now these are released by going in the sales order VA02 and after releasing the delivery is created. Again for these two items , i need the sales order change date as after a user goes and changes the sales order to remove the block only then delivery is created for these two items
    Also another scenario is the 2 line items go for back order and when we get stock  at tht time system confirms the stock and then the delivery is created for these. So also for this when this change occured i need to get the date for these 2 line items
    Can any one please suggest how to get this data  from the scenarios?
    I dont want to get the date when the delivery is created as i can get tht from the LIKP table. I need the sales order create and change dates for these.

    You may be aware, any changes to a document will be recorded in CDHDR (for header changes) and CDPOS (for item changes).  You can explore these two tables.
    thanks
    G. Lakshmipathi

  • Changing the item data in MIRO ,MIR7,MIR4 transactions

    Hi,
    Please help in finding out the BADI/User exit to change the line item data and passing changed data back to the main screen for MIRO,MIR7 and MIR4 transactions.

    Hi Neil,
    1. U said u have used SAVE_TEXT
       and it saves.
    2. To check if this happens or not, 
        After that write COMMIT Work.
    3. In DEBUG mode,
       execute till the FM and COMMIT Work,
    4. In another session,
       see the table STXH
       to know whether it REALLY Gets
       updated or not!
    regards,
    amit m.

  • MB_MIGO_BADI change header data in tcode MIGO

    HI Experts,
    I have a requirement to change the feild posting date(BUDAT) in the header data while doing migo.
    For this i have implemented a badi MB_MIGO_BADI->IF_EX_MB_MIGO_BADI~PAI_HEADER. This method has the field is_gohead-budat. but when i'm changing the value in the method,  its giving an error message saying you cannot change filed BUDAT.
    Can anyone help me how to achieve this change?
    Regards,
    Satyam

    HI Harald,
    Thanks for your active reply.
    I tried exit  EXIT_SAPLMBMB_001. But it is not getting called while doing MIGO. I tried putting a break-point.
    I followed the following procedure. Kindly correct me if I'm wrong.
    1. In tcode CMOD, I created the project: ZMD.
    2. In Enhancement assignment i have given the enhacement name as MB_CF001.
    3. In component section the exit EXIT_SAPLMBMB_001 has include ZXMBCU01.
    4. I have written the following code in the include :
         break-point.
            if sy-UZEIT GE '000000' AND sy-UZEIT LE '060000'.
             XMKPF-BUDAT = sy-datum - 1.
              endif.
    5. I activated the project ZMD.
    When i execute the tcode MIGO and post the document, ideally it should stop at the break-point. If it does not stop than that means the exit is not being called during the run time.
    Could you kindly guide me on this.
    The movement type for the GR is 101 and is done for outbound deliveries.
    Thanks & Regards,
    Satyam

  • Purchasing document item change date

    Hi GUrus,
    Could some one please explain me what is purchasing document item change date. while checking item changes for one PO i am getting this. it is showing one old value and one new value. only i wanted to know where is that date in side a PO.
    Thanks
    Sha

    Hello ,
    When you go to item level changes , sap shows the change history for that particular line items .
    So it will show all the values which is been changed . In terms of date , the old date is the date at which the line item must have been creaated or changed and the new date is the last change date by the user .
    For e.g .if the line item is changed multiple times , then it will show with respect to each date the change history . For better viewing and understanding you can sort the changes by date & find out what was the last change details .
    Hope its clear .
    Lawrence Fernandes

  • Change Date for Order Item Partner Changes

    When I make a change to a partner on an Order Item the Change Date VBAP-EDATU is not populated.  can anyone recommend a way to have this field filled for all changes to any fields on an Order (header and Item)?

    It can be done by WF, Why you need a warning message?
    Anyhow check badi
    PT_GEN_REQ or PT_ABS_REQ,

  • Change DATA at SAVE for ITEM

    Hi all.
    I must modify a date when SAVE an item (date ACTUAL_FINISH).
    I have implemented the interface /RPM/IF_EX_ITEM_API, but ther isn't methods for modifiy the datas of item. You have others BADI to suggest to make this?
    Thanks!
    Vanessa

    Yes, I have watched and it don't change the ITEM areas.
    But I have resolved the problem in this way.
    I have opened a enhancement in class RPMCL_ITEM_T_API, method UPDATE_ITEM_ATTRIBUTES and have varied the date.
    Thanks of all!
    Vanessa

  • SO Delivery date change when item category is modified

    Hi expert,
    When i change the item category on my SO, the delivery date change.
    Can you please give me the configuration, or exit to check how the delivery date is calculated?
    Regards.

    - Set a breakpoint at function module SD_SCHEDULING
    - Change your item category
    - This should trigger your breakpoint (if SD_SCHEDULING is changing the delivery date)
    - Post screenshot of call stack back here.
    Looking at the call stack will give us an idea of why a new scheduling is triggered.
    If SD_SCHEDULING is not called, then I assume it must be a user exit causing the issue - check your coding in the SD user exits of include MV45AFZZ.

  • RPM: Change DATA at SAVE for ITEM

    Hi all.
    I must modify a date when SAVE an item (date ACTUAL_FINISH).
    I have implemented the interface /RPM/IF_EX_ITEM_API, but ther isn't methods for modifiy the datas of item. You have others BADI to suggest to make this?
    Thanks!
    Vanessa

    Yes, I have watched and it don't change the ITEM areas.
    But I have resolved the problem in this way.
    I have opened a enhancement in class RPMCL_ITEM_T_API, method UPDATE_ITEM_ATTRIBUTES and have varied the date.
    Thanks of all!
    Vanessa

  • Sales Order Item Change Date and delta flag

    is there a field for Sales Order Item Change date in MC11VAOITM?
    Also is there a flag that tell if a record is a delta or not once it is extracted to BW?

    You may be aware, any changes to a document will be recorded in CDHDR (for header changes) and CDPOS (for item changes).  You can explore these two tables.
    thanks
    G. Lakshmipathi

  • Change date of item number

    Hello friends,
                         I am retreiving the change item number from table CDPOS from the field TABKEY , I also need to retreive the change date(When the user changes the item number) of item number. Can anyone pls tell where can I  get the change date from.

    *"Table declarations...................................................
    TABLES:
      EKKO,                                " Purchasing Document Header
      CDHDR,                               " Change document header
      SSCRFIELDS.                          " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
      S_EBELN FOR EKKO-EBELN,              " Purchasing Document Number
      S_LIFNR FOR EKKO-LIFNR,              " Vendor's account number
      S_EKGRP FOR EKKO-EKGRP,              " Purchasing group
      S_BEDAT FOR EKKO-BEDAT,              " Purchasing Document Date
      S_UDATE FOR CDHDR-UDATE.             " Creation date of the change
                                           " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number                       *
    DATA:
      BEGIN OF FS_EBELN,
        EBELN(90) TYPE C,                  " Purchase Document Number
        ERNAM     TYPE EKKO-ERNAM,         " Name of Person who Created
                                           " the Object
        LIFNR     TYPE EKKO-LIFNR,         " Vendor's account number
        EKGRP     TYPE EKKO-EKGRP,         " Purchasing group
        BEDAT     TYPE EKKO-BEDAT,         " Purchasing Document Date
      END OF FS_EBELN,
    Field String to hold Purchase Document Header                       *
      BEGIN OF FS_EKKO,
        EBELN TYPE EKKO-EBELN,             " Purchasing Document Number
        ERNAM TYPE EKKO-ERNAM,             " Name of Person who Created the
                                           " Object
        LIFNR TYPE EKKO-LIFNR,             " Vendor's account number
        EKGRP TYPE EKKO-EKGRP,             " Purchasing group
        BEDAT TYPE EKKO-BEDAT,             " Purchasing Document Date
      END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor          *
      BEGIN OF FS_LFA1,
        LIFNR TYPE LFA1-LIFNR,             " Account Number of Vendor
        NAME1 TYPE LFA1-NAME1,             " Name1
      END OF FS_LFA1,
    Field String to hold Change date and the name of the user           *
      BEGIN OF FS_CDHDR,
        OBJECTCLAS TYPE CDHDR-OBJECTCLAS,  " Object Class
        OBJECTID   TYPE CDHDR-OBJECTID,    " Object value
        CHANGENR   TYPE CDHDR-CHANGENR,    " Document change number
        USERNAME   TYPE CDHDR-USERNAME,    " User name
        UDATE      TYPE CDHDR-UDATE,       " Creation date of the change
                                           " document
      END OF FS_CDHDR,
    Field String to hold Change document items                          *
      BEGIN OF FS_CDPOS,
        OBJECTCLAS   TYPE CDPOS-OBJECTCLAS," Object class
        OBJECTID(10) TYPE C,               " Object Value
        CHANGENR     TYPE CDPOS-CHANGENR,  " Document change number
        TABNAME      TYPE CDPOS-TABNAME,   " Table Name
        FNAME        TYPE CDPOS-FNAME,     " Field Name
        VALUE_NEW    TYPE CDPOS-VALUE_NEW, " New contents of changed field
        VALUE_OLD    TYPE CDPOS-VALUE_OLD, " Old contents of changed field
      END OF FS_CDPOS,
    Field String to hold Date Element Name                              *
      BEGIN OF FS_DATAELE,
        TABNAME   TYPE DD03L-TABNAME,      " Table Name
        FIELDNAME TYPE DD03L-FIELDNAME,    " Field Name
        ROLLNAME  TYPE DD03L-ROLLNAME,     " Data element (semantic domain)
      END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element                 *
      BEGIN OF FS_TEXT,
        ROLLNAME TYPE DD04T-ROLLNAME,      " Data element (semantic domain)
        DDTEXT   TYPE DD04T-DDTEXT,        " Short Text Describing R/3
                                           " Repository Objects
      END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid           *
      BEGIN OF FS_OUTTAB,
        EBELN      TYPE EKKO-EBELN,        " Purchasing Document Number
        ERNAM      TYPE EKKO-ERNAM,        " Name of Person who Created the
                                           " Object
        LIFNR      TYPE EKKO-LIFNR,        " Vendor's account number
        EKGRP      TYPE EKKO-EKGRP,        " Purchasing group
        BEDAT      TYPE EKKO-BEDAT,        " Purchasing Document Date
        WERKS      TYPE LFA1-WERKS,        " Plant
        NAME1      TYPE LFA1-NAME1,        " Name1
        USERNAME   TYPE CDHDR-USERNAME,    " User name
        UDATE      TYPE CDHDR-UDATE,       " Creation date of the change
                                           " document
        DDTEXT     TYPE DD04T-DDTEXT,      " Short Text Describing R/3
                                           " Repository Objects
        VALUE_NEW  TYPE CDPOS-VALUE_NEW,   " New contents of changed field
        VALUE_OLD  TYPE CDPOS-VALUE_OLD,   " Old contents of changed field
      END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number                     *
      T_EBELN LIKE STANDARD TABLE
                OF FS_EBELN,
    Internal table to hold Purchase Document Header                     *
    T_EKKO LIKE STANDARD TABLE
              OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header                *
    T_EKKO_TEMP LIKE STANDARD TABLE
                   OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor        *
      T_LFA1 LIKE STANDARD TABLE
               OF FS_LFA1,
    Internal Table to hold Change date and the name of the user         *
      T_CDHDR LIKE STANDARD TABLE
                OF FS_CDHDR,
    Internal Table to hold Change document items                        *
      T_CDPOS LIKE STANDARD TABLE
                OF FS_CDPOS,
    Temp. Internal Table to hold Change document items                  *
      T_CDPOS_TEMP LIKE STANDARD TABLE
                     OF FS_CDPOS,
    Internal Table to hold Data Element Name                            *
      T_DATAELE LIKE STANDARD TABLE
                  OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name                      *
      T_DATAELE_TEMP LIKE STANDARD TABLE
                       OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element               *
      T_TEXT LIKE STANDARD TABLE
               OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid         *
      T_OUTTAB LIKE STANDARD TABLE
                 OF FS_OUTTAB.
                   C L A S S   D E F I N I T I O N                      *
      CLASS LCL_EVENT_HANDLER  DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables                                                      *
      DATA:
        W_EBELN       TYPE EKKO-EBELN,     " Purchasing Document Number
        W_LIFNR       TYPE EKKO-LIFNR,     " Vendor's account number
        W_EKGRP       TYPE EKKO-EKGRP,     " Purchasing group
        W_VALUE       TYPE EKKO-EBELN,     " Reflected Value
        W_SPACE       VALUE ' ',           " Space
        W_FLAG        TYPE I,              " Flag Variable
        W_VARIANT     TYPE DISVARIANT,     " Variant
    *--- ALV Grid
        W_GRID        TYPE REF TO CL_GUI_ALV_GRID,
    *--- Event Handler
        W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    *--- Field catalog table
        T_FIELDCAT    TYPE LVC_T_FCAT.
                          AT SELECTION-SCREEN EVENT                     *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
      PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
      PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
      PERFORM VALIDATE_PUR_GRP.
                          START-OF-SELECTION EVENT                      *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
      PERFORM SELECT_PO.
      CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
        PERFORM SELECT_OBJ_ID.
      CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
        PERFORM SELECT_CHANGED_VALUE.
      CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
        PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
        PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
        PERFORM DESCRIPTION.
                          END-OF-SELECTION EVENT                        *
    END-OF-SELECTION.
      IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
        PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
        PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
        CALL SCREEN 100.
      ENDIF.                               " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
            HANDLE_HOTSPOT_CLICK
                 FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                           IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS.                              " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
      METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
        PERFORM GET_CELL_INFO.
        SET PARAMETER ID 'BES' FIELD W_VALUE.
        CALL TRANSACTION 'ME23N'.
      ENDMETHOD.                           " HANDLE_HOTSPOT_CLICK
    ENDCLASS.                              " LCL_EVENT_HANDLER
    *&      Module  STATUS_0100  OUTPUT
          PBO Event
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'OOPS'.
      SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
      PERFORM FILL_VARIANT.
      IF W_GRID IS INITIAL.
        CREATE OBJECT W_GRID
          EXPORTING
       I_SHELLSTYLE      = 0
       I_LIFETIME        =
            I_PARENT       = CL_GUI_CONTAINER=>SCREEN0
       I_APPL_EVENTS     =
       I_PARENTDBG       =
       I_APPLOGPARENT    =
       I_GRAPHICSPARENT  =
       I_NAME            =
       I_FCAT_COMPLETE   = SPACE
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.                             " IF SY-SUBRC <> 0
        CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
           I_BUFFER_ACTIVE               =
           I_BYPASSING_BUFFER            =
           I_CONSISTENCY_CHECK           =
           I_STRUCTURE_NAME              =
            IS_VARIANT                    = W_VARIANT
            I_SAVE                        = 'A'
           I_DEFAULT                     = 'X'
           IS_LAYOUT                     =
           IS_PRINT                      =
           IT_SPECIAL_GROUPS             =
           IT_TOOLBAR_EXCLUDING          =
           IT_HYPERLINK                  =
           IT_ALV_GRAPHICS               =
           IT_EXCEPT_QINFO               =
           IR_SALV_ADAPTER               =
          CHANGING
            IT_OUTTAB                     = T_OUTTAB
            IT_FIELDCATALOG               = T_FIELDCAT
           IT_SORT                       =
           IT_FILTER                     =
          EXCEPTIONS
            INVALID_PARAMETER_COMBINATION = 1
            PROGRAM_ERROR                 = 2
            TOO_MANY_LINES                = 3
            OTHERS                        = 4
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.                             " IF SY-SUBRC <> 0.
      ENDIF.                               " IF W_GRID IS INITIAL
      CREATE OBJECT W_EVENT_CLICK.
      SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          PAI Event
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  PREPARE_FIELD_CATALOG
          Subroutine to build the Field catalog
          <--P_T_FIELDCAT  Field Catalog Table
    FORM PREPARE_FIELD_CATALOG  CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
      DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
      LS_FCAT-FIELDNAME = 'EKGRP'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Purchasing Document Number...
      LS_FCAT-FIELDNAME = 'EBELN'.
      LS_FCAT-REF_TABLE = 'EKKO' .
      LS_FCAT-EMPHASIZE = 'C411'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-HOTSPOT   = 'X'.
      APPEND LS_FCAT TO PT_FIELDCAT .
      CLEAR LS_FCAT .
    Name of Person who Created the Object...
      LS_FCAT-FIELDNAME = 'ERNAM'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-OUTPUTLEN = '15' .
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Purchasing Document Date...
      LS_FCAT-FIELDNAME = 'BEDAT'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Vendor's account number...
      LS_FCAT-FIELDNAME = 'LIFNR'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
      LS_FCAT-FIELDNAME = 'NAME1'.
      LS_FCAT-REF_TABLE = 'LFA1'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-COLTEXT   = 'Vendor Name'(001).
      LS_FCAT-SELTEXT   = 'Vendor Name'(001).
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Creation date of the change document...
      LS_FCAT-FIELDNAME = 'UDATE'.
      LS_FCAT-REF_TABLE = 'CDHDR'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-COLTEXT   = 'Change Date'(002).
      LS_FCAT-SELTEXT   = 'Change Date'(002).
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    User name of the person responsible in change document...
      LS_FCAT-FIELDNAME = 'USERNAME'.
      LS_FCAT-REF_TABLE = 'CDHDR'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-COLTEXT   = 'Modified by'(003).
      LS_FCAT-SELTEXT   = 'Modified by'(003).
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
      LS_FCAT-FIELDNAME = 'DDTEXT'.
      LS_FCAT-REF_TABLE = 'DD04T'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '15'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Old contents of changed field...
      LS_FCAT-FIELDNAME = 'VALUE_OLD'.
      LS_FCAT-REF_TABLE = 'CDPOS'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '12'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    New contents of changed field...
      LS_FCAT-FIELDNAME = 'VALUE_NEW'.
      LS_FCAT-REF_TABLE = 'CDPOS'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '12'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    ENDFORM.                               " PREPARE_FIELD_CATALOG
    *& Form  SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
       SELECT EBELN                        " Purchasing Document Number
              ERNAM                        " Name of Person who Created
                                           " the Object
              LIFNR                        " Vendor's account number
              EKGRP                        " Purchasing group
              BEDAT                        " Purchasing Document Date
         FROM EKKO
      PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
        WHERE EBELN IN S_EBELN
          AND BEDAT IN S_BEDAT.
       ENDSELECT.
    IF SY-SUBRC NE 0.
       W_FLAG = 1.
       MESSAGE S401(M8).
    ENDIF.                                " IF SY-SUBRC NE 0
    ENDFORM.                               " SELECT_PO
    *&  Form  SELECT_OBJ_ID
      Subroutine to select Object ID
      There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
        SELECT OBJECTCLAS                  " Object Class
               OBJECTID                    " Object value
               CHANGENR                    " Document change number
               USERNAME                    " User name
               UDATE                       " Creation date
          FROM CDHDR
          INTO TABLE T_CDHDR
       FOR ALL ENTRIES IN T_EBELN
         WHERE OBJECTID EQ T_EBELN-EBELN
           AND UDATE IN S_UDATE
           AND TCODE IN ('ME21N','ME22N','ME23N').
       ENDSELECT.
       IF SY-SUBRC NE 0.
         W_FLAG = 1.
         MESSAGE S833(M8) WITH 'Header Not Found'(031).
       ENDIF.                              " IF SY-SUBRC NE 0.
    ENDIF.                                " IF NOT T_EBELN IS INITIAL
    ENDFORM.                               " SELECT_OBJ_ID
    *&  Form  SELECT_CHANGED_VALUE
      Subroutine to select Changed Values
      There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
        SELECT OBJECTCLAS                  " Object class
               OBJECTID                    " Object value
               CHANGENR                    " Document change number
               TABNAME                     " Table Name
               FNAME                       " Field Name
               VALUE_NEW                   " New contents of changed field
               VALUE_OLD                   " Old contents of changed field
          FROM CDPOS
       PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
       FOR ALL ENTRIES IN T_CDHDR
         WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
           AND OBJECTID   EQ T_CDHDR-OBJECTID
           AND CHANGENR   EQ T_CDHDR-CHANGENR.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          W_FLAG = 1.
          MESSAGE S833(M8) WITH 'Item Not Found'(032).
        ENDIF.                             " IF SY-SUBRC NE 0.
    ENDIF.                               " IF NOT T_CDHDR IS INITIAL
      T_CDPOS_TEMP[] = T_CDPOS[].
    ENDFORM.                               " SELECT_CHANGED_VALUE
    *&   Form  SELECT_PUR_DOC
       Subroutine to select Purchase Order Details
       There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
        SORT T_EBELN BY EBELN.
        LOOP AT T_CDPOS INTO FS_CDPOS.
          READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
                                          FS_CDPOS-OBJECTID BINARY SEARCH.
          IF SY-SUBRC NE 0.
            DELETE TABLE T_EBELN FROM FS_EBELN.
          ENDIF.                           " IF SY-SUBRC NE 0.
        ENDLOOP.                           " LOOP AT T_CDPOS...
        LOOP AT T_EBELN INTO FS_EBELN.
          MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
          MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
          MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
          MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
          MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
          APPEND FS_EKKO TO T_EKKO.
        ENDLOOP.                           " LOOP AT T_EBELN...
        T_EKKO_TEMP[] = T_EKKO[].
    ENDIF.                               " IF NOT T_CDPOS IS INITIAL
    ENDFORM.                               " SELECT_PUR_DOC
    *&  Form  SELECT_VENDOR
      Subroutine to select Vendor details
      There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
      IF NOT T_EKKO IS INITIAL.
        SORT T_EKKO_TEMP BY LIFNR.
        DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
        SELECT LIFNR                       " Account Number of Vendor or
                                           " Creditor
               NAME1                       " Name 1
          FROM LFA1
          INTO TABLE T_LFA1
       FOR ALL ENTRIES IN T_EKKO_TEMP
         WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
       IF SY-SUBRC NE 0.
         MESSAGE S002(M8) WITH 'Master Details'(033).
       ENDIF.                              " IF SY-SUBRC NE 0.
      ENDIF.                               " IF NOT T_EKKO IS INITIAL
    ENDFORM.                               " SELECT_VENDOR
    *&  Form  DESCRIPTION
      Subroutine to get the description
      There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
        SORT T_CDPOS_TEMP BY TABNAME FNAME.
        DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
        SELECT TABNAME                     " Table Name
               FIELDNAME                   " Field Name
               ROLLNAME                    " Data element
          FROM DD03L
          INTO TABLE T_DATAELE
       FOR ALL ENTRIES IN T_CDPOS_TEMP
         WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
           AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
        IF NOT T_DATAELE IS INITIAL.
        T_DATAELE_TEMP[] = T_DATAELE[].
        SORT T_DATAELE_TEMP BY ROLLNAME.
        DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
          SELECT ROLLNAME                  " Data element
                 DDTEXT                    " Short Text Describing R/3
                                           " Repository Objects
            FROM DD04T
            INTO TABLE T_TEXT
         FOR ALL ENTRIES IN T_DATAELE_TEMP
           WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
             AND DDLANGUAGE EQ SY-LANGU.
          IF SY-SUBRC NE 0.
            EXIT.
          ENDIF.                           " IF SY-SUBRC NE 0.
        ENDIF.                             " IF NOT T_DATAELE IS INITIAL.
    ENDIF.                               " IF NOT T_CDPOS IS INITIAL.
    ENDFORM.                               " DESCRIPTION
    *&  Form  FILL_OUTTAB
      Subroutine to populate the Outtab
      There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
      SORT T_CDHDR   BY OBJECTCLAS OBJECTID CHANGENR.
      SORT T_EKKO    BY EBELN.
      SORT T_LFA1    BY LIFNR.
      SORT T_DATAELE BY TABNAME FIELDNAME.
      SORT T_TEXT    BY ROLLNAME.
      LOOP AT T_CDPOS INTO FS_CDPOS.
        READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
                                       OBJECTCLAS = FS_CDPOS-OBJECTCLAS
                                       OBJECTID = FS_CDPOS-OBJECTID
                                       CHANGENR = FS_CDPOS-CHANGENR
                                       BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
            MOVE FS_CDHDR-UDATE    TO FS_OUTTAB-UDATE.
            READ TABLE T_EKKO INTO FS_EKKO WITH KEY
                                           EBELN = FS_CDHDR-OBJECTID
                                           BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
                MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
                MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
                MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
                MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
                READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
                                               LIFNR = FS_EKKO-LIFNR
                                               BINARY SEARCH.
                  IF SY-SUBRC EQ 0.
                    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
                  ENDIF.                   " IF SY-SUBRC EQ 0.
              ENDIF.                       " IF SY-SUBRC EQ 0.
          ENDIF.                           " IF SY-SUBRC EQ 0.
        MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
        MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
        READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
                                             TABNAME = FS_CDPOS-TABNAME
                                             FIELDNAME = FS_CDPOS-FNAME
                                             BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            READ TABLE T_TEXT INTO FS_TEXT WITH KEY
                                           ROLLNAME = FS_DATAELE-ROLLNAME
                                           BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
              ENDIF.                       " IF SY-SUBRC EQ 0.
          ENDIF.                           " IF SY-SUBRC EQ 0.
        APPEND FS_OUTTAB TO T_OUTTAB.
        CLEAR FS_OUTTAB.
      ENDLOOP.
    ENDFORM.                               " FILL_OUTTAB
    *&   Form  GET_CELL_INFO
       Subroutine to get the Cell Information
    -->  W_VALUE   Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
      CALL METHOD W_GRID->GET_CURRENT_CELL
        IMPORTING
         E_ROW     =
          E_VALUE   = W_VALUE
         E_COL     =
         ES_ROW_ID =
         ES_COL_ID =
         ES_ROW_NO =
    ENDFORM.                               " GET_CELL_INFO
    *&   Form  VALIDATE_PD_NUM
       Subroutine to validate Purchase Document Number
       There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
      IF NOT S_EBELN[] IS INITIAL.
        SELECT EBELN                       " Purchase Document Number
          FROM EKKO
          INTO W_EBELN
         UP TO 1 ROWS
         WHERE EBELN IN S_EBELN.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          CLEAR SSCRFIELDS-UCOMM.
          MESSAGE E717(M8).
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF NOT S_EBELN[]...
    ENDFORM.                               " VALIDATE_PD_NUM
    *&   Form  VALIDATE_VEN_NUM
       Subroutine to validate Vendor Number
       There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
      IF NOT S_LIFNR[] IS INITIAL.
        SELECT LIFNR                       " Vendor Number
          FROM LFA1
          INTO W_LIFNR
         UP TO 1 ROWS
         WHERE LIFNR IN S_LIFNR.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          CLEAR SSCRFIELDS-UCOMM.
          MESSAGE E002(M8) WITH W_SPACE.
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF NOT S_LIFNR[]...
    ENDFORM.                               " VALIDATE_VEN_NUM
    *&   Form  VALIDATE_PUR_GRP
       Subroutine to validate the Purchase Group
       There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
      IF NOT S_EKGRP[] IS INITIAL.
        SELECT EKGRP                       " Purchase Group
          FROM T024
          INTO W_EKGRP
         UP TO 1 ROWS
         WHERE EKGRP IN S_EKGRP.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          CLEAR SSCRFIELDS-UCOMM.
          MESSAGE E622(M8) WITH W_SPACE.
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF NOT S_EKFRP[]...
    ENDFORM.                               " VALIDATE_PUR_GRP
    *& Form  FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
      W_VARIANT-REPORT = SY-REPID.
      W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM.                               " FILL_VARIANT
    Check the above Program. You have related data from <b>CDPOS, CDHDR.</b>
    Regards,
    Pavan

  • Get change date of purchnage requesition item

    Dear All,
    I am using CDPOS and CDHDR tables to track the approval change date.
    CDPOS returns the  same change no for any chnages in same fields at diffrent dates.
    When i pass same change to CDHDR , Iam getting same date for all purch Req.
    Please help me to get Purch Req appproval date.

    hi!
      Have u created the change document properly and is the changes getting logged in the table or not.........
    in transaction SCDO you need to create a change object and according to that...
    check the change document in table from where the date if coming in its further characteristics of that table where the date is there.so that changes are logged for that date.
    and then where you are changing u need to call the function module name generated in scdo transaction in your program after the changed make to logg the changes and then chek in cpos and cdhdr tables and use them to use changes.
    example is....
    wa-yh1316_name   = 'Fff
    wa-yh1316_age = '16'.
    INSERT into ztest01 values wa.
    IF sy-subrc = 0.
    objectid = 'yh1316_name'.
          CALL FUNCTION 'Z_TABLE_WRITE_DOCUMENT'
            EXPORTING
              objectid                      = OBJECTID
              tcode                         = 'SE38'
              utime                         = SY-UZEIT
              udate                         = SY-DATUM
              username                      = 'SAPDEV02'
    *         PLANNED_CHANGE_NUMBER         = ' '
             OBJECT_CHANGE_INDICATOR       = 'I'
    *         PLANNED_OR_REAL_CHANGES       = ' '
    *         NO_CHANGE_POINTERS            = ' '
             UPD_ICDTXT_Z_TABLE            = 'I'
              n_ztest01                     = WA
              o_ztest01                     = WA
             UPD_ZTEST01                   = 'I'
            tables
              icdtxt_z_table                = ICDTXT_Z_TABLE
    ENDIF.

  • Inserting/ deleting a line item in MIGO Transaction ( Goods Issue )?

    Hi,
    Can anyone help me with the logic for Inserting / deleting a line item in MIGO Transaction?
    Thanks,
    cs

    Hi
    The following user exits and badis for migo:
    Check the mb_migo_badi and check the method 'LINE_MODIFY' for u r purpose.
    For undestanding see the documentation of the badi and see the example implementation
    class: CL_EXM_IM_MB_MIGO_BADI
                                                                                    Enhancement/ Business Add-in            Description                                                                               
    Enhancement                                                                               
    MB_CF001                                Customer Function Exit in the Case of Updating a Art. Doc.      
    MBCF0011                                Read from RESB and RKPF for print list in  MB26                 
    MBCF0010                                Customer exit: Create reservation BAPI_RESERVATION_CREATE1      
    MBCF0009                                Filling the storage location field                              
    MBCF0007                                Customer function exit: Updating a reservation                  
    MBCF0006                                Customer function for WBS element                               
    MBCF0005                                Article document item for goods receipt/issue slip              
    MBCF0002                                Customer function exit: Segment text in article doc. item                                                                               
    Business Add-in                                                                               
    MB_RESERVATION_BADI                     MB21/MB22: Check and Complete Dialog Data                       
    MB_QUAN_CHECK_BADI                      BAdI: Item Data at Time of Quantity Check                       
    MB_PHYSINV_INTERNAL                     Connection: Core Inventory and Retail AddOn                     
    MB_MIGO_ITEM_BADI                       BAdI in MIGO for Changing Item Data                             
    MB_MIGO_BADI                            BAdI in MIGO for External Detail Subscreens                     
    MB_DOC_BADI_INTERNAL                    BAdIs when Creating an Article Document (SAP Internal)          
    MB_DOCUMENT_UPDATE                      BADI when updating article document: MSEG and MKPF              
    MB_DOCUMENT_BADI                        BAdIs when Creating an Article Document                         
    MB_CIN_MM07MFB7_QTY                     Proposal of quantity from Excise invoice in GR                  
    MB_CIN_MM07MFB7                         BAdI for India Version exit in include MM07MFB7                 
    MB_CIN_LMBMBU04                         posting of gr                                                   
    MB_CHECK_LINE_BADI                      BAdI: Check Line Before Copying to the Blocking Tables          
    ARC_MM_MATBEL_WRITE                     Check Add-On-Specific Data for MM_MATBEL                        
    ARC_MM_MATBEL_CHECK                     Check Add-On-Specific Criteria for MM_MATBEL    
    If it is helpfu rewards points
    Regards
    Pratap.M

  • How to increase the line items against the std no of line items in MIGO

    hi,
    I have PO with more than 100 line items
    During GR system is showing the error message as
    Maximum number of items F1 reached
    What is the standard no of line items in MIGO
    And how to increase the line items
    Is there any notes to apply
    plz give sutable solution
    K.Raghuram

    Do you get message F5727 "Maximum number of items in FI reached"? reason is that in FI the posting line has a three-digit line item number (BSEG-BUZEI).
    SAP's note 117708 provides a modification. I am pasting solution below.
    Via the summarization you can post documents with more than 999 items in
    FI.
    The modification required for this is small, in addition you have to
    change 2 tables. The modification is carried out in FI not in invoice
    verification.
    To activate document summarization in FI proceed as follows:
    - The changes are described in Note 36353 and for the
    modification in Note 77161. You may also have to apply Note
    67640 so that the document summarization affects inventory
    management.
    An advice for the notes:
    36353: Solution point 3: Field name WERKS
    77161: Solution point 2: Maintain table TTYPV with Transaction
    SE16
    - this has the following effects; you can no longer clear the
    GR/IR clearing account on purchase order item level (but only
    on purchase order level) and you can only display the FI data
    summarized (also see Note 36353)

Maybe you are looking for

  • How can I change the fonts used in Yosemite

    It would appear that Apple have gone out of their way to make OS X as difficult to use as possible with the change of fonts colours. To make matters worse it would appear we all have to adhere to the Apple accessibility rules if we want to change any

  • Find and replace string in a file using batch script

    I am writing a batch script to replace " ", with " ". The below code works but it prefixes each line with the line number and :. It is the last part of the line that I am trying to replace. E.g. " ","BALANCE_SHEET ","ASSETS ","03","LEVEL_2 ",Asset Ac

  • Naming files Log and Transfer'd from a card

    I'm still experimenting with workflow after starting to capture on an AVHCD card instead of tape. I'm getting the shots into FCP ok, and have worked out how to assemble them so it's like working off tape rather than wading endlessy through scores of

  • 5TH GEN and Vauxhall Insignia

    Hi again , I have just bought a 59 reg Insignia with a usb port for ipod but when I plug my 5th gen ipod it it states that it is not supported yet I can plug my wife's 3rd gen classic in and that works!!! Anyone else had these issues and been able to

  • How can I get rid of all Glue references?

    I do not use Glue nor wish to.