Error 'Enter order unit'  in PIR Change using IDOC INFREC01

Hi All,
I am creating Purchase info record using IDOC INFREC01 and condition type using IDOC COND_A04. Its working fine in case of create PIR.
But If I pass PIR number in the upload with other fields to be chnaged then IDOC goes the in the error with status 51 , Error
"Enter Order unit". I am passing both base unit of measure (MEINS) and purchase order unit (LMEIN).
Kindly help find out the issue....!!!
Thanks in advance.

Hi,
Check if you are passing the ISO code for unit of measure?
Also, Try debug using WE19 and find out where you are getting the error.
Hope it helps.
Sujay

Similar Messages

  • How to use idoc infrec01

    Any example or docu about how to use idoc infrec01?
    Thanks.

    This idoc is for Purchasing info record.
    U can get the docu in we60 tcode.
    enter the name in basic type and go menu documentation->html format.
    Regards

  • Error " enter Org Unit sales"

    Hi CRM SDNers,
    In a servicer transaction the responsible org determination is carried automatically (a pop-up for selection) and later I changed the determined org unit manually to XYZ.. this is showing an error that the Item level "enter org unit sales".
    We dont use any sales organization in our application.  Please sugget / guide how to resolve this error.
    Regards,
    Fedor.

    Hi
    Provide the same details.
    Create org. and other in tcode :BP.
    Cheers
    Deepanshu

  • How to attempt production orders and get feedback by using IDocs

    Hi,
    I'm new new to SAP and R3 respectively mySAP. I need to know how to use IDocs (over file system) to attempt production orders to an extern application and how to get the feedback of the whole orders and single operations.
    I found the IDoc-base-type "PPCC2RECORDER01" to send production orders. Is that the right base type for production orders?
    (In consideration of compatibility and support me was recommend to avoid the old types OPERA2 and CONF21.)
    What IDoc-types do I need to get feedback about a production order and its operations?
    I hope someone is understanding my questions is able to help me. Please apologize my broken English.
    Thanks!
    Hannes

    PROGRAM....... ZRCCLORDPROC
    TITLE......... Production Odrer Idocs
    AUTHOR........ Aveek Ghose
    DATE WRITTEN.. 15/09/2006
    R/3 RELEASE... 4.6C
    =====================================================================*
    COPIED FROM... N/A
    DESCRIPTION...
    *& Creation of production order IDOCs to a given selection
    *& This program selects to an input given via the selection screen the *
    *& corresponding production orders from the database. Then the function
    *& module for creation of planned order idocs is called.               *
    *& In general this report is called from the report RCCLTRAN, but it   *
    *& can also be used for its own.                                       *
    =====================================================================*
    PROGRAM TYPE.. Outbound Interface
    DEV. CLASS.... ZPD1
    LOGICAL DB.... N/A
    =====================================================================*
    SCREENS....... N/A
    GUI TITLE..... N/A
    GUI STATUS.... N/A
    TRANSACTIONS.. N/A
    USER EXITS.... N/A
    =====================================================================*
    CHANGE HISTORY                                                       *
    Date       By        Correction Number & Brief Description     Release
    Tables / Structures
    REPORT  zrcclordproc
            NO STANDARD PAGE HEADING
            MESSAGE-ID ZCUST
            LINE-COUNT 65(0)
            LINE-SIZE 255.
    INCLUDE RCORDO01.                    " PBO-Modules                   *
    INCLUDE RCORDI01.                    " PAI-Modules                   *
    INCLUDE RCORDF01.                    " FORM-Routines                 *
    --> Global data
    TYPE-POOLS: cloi.
    include zprodata.        "Types / constants for Orderselection
    include zrcordtop.                      "Tables / Data for this report
    include zrcordtop1.
    include yrccl_constants.
    TABLES : jcds,
             tvarv,
             zzzz_xref_data.
    TYPES:  BEGIN OF ty_date,
              aufnr  TYPE aufnr,
              aedat  TYPE aufaedat,
              aezeit TYPE co_chg_time,
              erdat  TYPE auferfdat,
              erfzeit TYPE co_ins_time,
              loekz  TYPE aufloekz,
              indicator(1) TYPE c,
           END OF ty_date.
    DATA: is_enhancement type isu_ord_segments_determine.
    DATA: itab_date TYPE STANDARD TABLE OF ty_date
                         INITIAL SIZE 0 WITH HEADER LINE.
    DATA: f_objnr TYPE j_objnr.
    DATA: g_report_sub_head(72) TYPE c,          "Sub-Header hold area
          g_report_head(72)     TYPE c,          "Header hold area
          g_run_date(72)        TYPE c,          "Holds message for Run date
          g_run_time(72)        TYPE c.          "Holds message for Run time
    DATA:
    f_old_date TYPE datum,
    f_old_time TYPE uzeit,
    f_continue(1) TYPE c.
    END OF INSERTION DS001
    --> Überschrift für sonstige Einstellungen
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF BLOCK miscellaneous WITH FRAME.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN COMMENT 1(30) text-001. "#EC
    SELECTION-SCREEN SKIP 1.
    *>> Logical system comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-002.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS opt_sys LIKE tbdlst-logsys.
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-003.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS mestyp LIKE tbdme-mestyp.
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-004.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS:     p_date     TYPE sydatum.       "last run date
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-005.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS:     p_time     TYPE syuzeit.       "last run time
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK MISCELLANEOUS.
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-006.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS: p_update   AS   CHECKBOX DEFAULT space.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-007.
    SELECTION-SCREEN POSITION 32.
    SELECT-OPTIONS: s_rundt FOR sy-datum NO-EXTENSION.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-008.
    SELECTION-SCREEN POSITION 32.
    SELECT-OPTIONS: s_runtm FOR sy-uzeit NO-EXTENSION.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    **MOD-006
    *SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 3(30) text-009.
    *SELECTION-SCREEN POSITION 32.
    *SELECT-OPTIONS: s_emat FOR zzzz_xref_data-z_in_value.
    *SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK miscellaneous.
    **MOD-006
    Write selected AUFPL numbers via ranges table to memory ?
    PARAMETERS:
      ordtomem TYPE cloi_x DEFAULT '' NO-DISPLAY.  "X: yes
    do not select from MARC, but use ranges tables directly.   MK 4.0C
    matnr_gl and werks_gl must have the same length.
    PARAMETERS: no_sel  TYPE c DEFAULT ' ' NO-DISPLAY.
    --> Normal selection parameters for ORD comes from the logical db
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    --> Select the ORD according to the selected
        MRP controller, Material, work center and plant
    *MOD-006
    Validate the last run date & Time
    PERFORM validate_last_run_date_time.
    *MOD-006
    BEGIN OF INSERTION DS001
    get the entry of the last program run
    select single * for update from ycloidownlprot
                     where logsys = OPT_SYS and
                           downloadtype eq C_DOWNL_PROCESS_ORDERS.
    if YCLOIDOWNLPROT-IN_PROGRESS eq CLOI_TRUE.
    program is already running, do not allow to start again
       write : / text-004, YCLOIDOWNLPROT-USERNAME.
       exit.
    endif.
    YCLOIDOWNLPROT-MANDT        = SY-MANDT.
    YCLOIDOWNLPROT-LOGSYS       = OPT_SYS.
    YCLOIDOWNLPROT-START_DATE   = SY-DATUM.
    YCLOIDOWNLPROT-START_TIME   = SY-UZEIT.
    YCLOIDOWNLPROT-USERNAME     = SY-UNAME.
    YCLOIDOWNLPROT-DOWNLOADTYPE = C_DOWNL_PROCESS_ORDERS.
    YCLOIDOWNLPROT-IN_PROGRESS  = CLOI_TRUE.
    insert or update entry (dependant if entry already exists)
    MODIFY YCLOIDOWNLPROT.
    COMMIT WORK.
    CLEAR CREATED_MASTERIDOCS_PRO.
    EXPORT CREATED_MASTERIDOCS_PRO TO MEMORY ID 'YLOI001'.
    END OF INSERTION DS001
    BEGIN OF INSERTION DS001
    if not sscrfields-ucomm = 'ONLI'.   mk zu 4.0
      exit.
    endif.
    if s_dispo is initial and
        s_matnr is initial and
        s_arbpl is initial and
        s_werks is initial.
       exit.
    endif.
    Send only orders with type 40 - process orders
    p_autyp = '40'.
    END OF INSERTION DS001
    *>> Put the ranges tabs back into matwrk list if no selection (NO_SEL)
      IF no_sel = cloi_true.
        CLEAR t_matwrk_key. REFRESH t_matwrk_key.
        LOOP AT s_matnr.
          t_matwrk_key-matnr = s_matnr-low.
          READ TABLE s_werks  INDEX sy-tabix.
          t_matwrk_key-werks  = s_werks-low.
          APPEND t_matwrk_key.
        ENDLOOP.
        SORT t_matwrk_key BY matnr werks.
        DELETE ADJACENT DUPLICATES FROM t_matwrk_key.
    delete duplicate duplicates from ranges table. Therfore sort by LOW
    (HIGH is not used in this case).
        SORT s_matnr BY low.
        DELETE ADJACENT DUPLICATES FROM s_matnr.
        SORT s_werks BY low.
        DELETE ADJACENT DUPLICATES FROM s_werks.
      ENDIF.
    --> Determine which segments are selected in the message type
      PERFORM ord_segments_determine
        USING mestyp
        CHANGING afpo_x
                 jstk_x
                 afab_x
                 affl_x
                 afvo_x
                 kbed_x
                 jstv_x
                 resb_x
                 kbeu_x
                 afuv_x
                 is_enhancement
                 jstu_x.
    Export the flags to the memory, because the following subroutine
    must not have any parameters !!!
      EXPORT affl_x
             afvo_x
             kbed_x
             resb_x
             kbeu_x
             afuv_x
             TO MEMORY ID 'LOI03'.
    MK 19980326 enhanced selections on header/operation level
    get selection profile for log system from customizing if available
      SELECT SINGLE * FROM tcloi9 WHERE logsys = opt_sys.
    if entry exists for the logical system
      IF sy-subrc = 0.
    if an selection profile for the order is entered, use it for selection
        IF NOT tcloi9-ord_selid IS INITIAL.
          p_selid = tcloi9-ord_selid.
        ENDIF.
        IF NOT tcloi9-ord_opr_selid IS INITIAL AND
           NOT afvo_x IS INITIAL AND NOT affl_x IS INITIAL.
          ord_opr_selid = tcloi9-ord_opr_selid.
        ENDIF.
      ENDIF.
    initialize control key table for selections
      CALL FUNCTION 'CLOI_STEUS_GET'
           EXPORTING
                logsys_to_init         = opt_sys
           IMPORTING
                no_entry_for_logsys    = no_entry_for_logsys
           TABLES
                t_steus                = t_steus
           EXCEPTIONS
                logsys_not_initialized = 1
                OTHERS                 = 2.
    Write structure information into the memory
    perform fill_memory_selobj.
    -> import table with already sent orders
      IMPORT gt_aufnrdone FROM MEMORY ID 'LOIAUFNRTAB'.         "N599845
      SORT gt_aufnrdone BY low.                                 "N599845
    --> Read header information
    GET ioheader.
      Check if material/plant combination is selected MK 4.0C
      CLEAR check_flg.
      IF no_sel = cloi_true.
        READ TABLE t_matwrk_key
                   WITH  KEY matnr = ioheader-matnr
                             werks = ioheader-werks BINARY SEARCH.
        IF sy-subrc  <> 0.
          check_flg = cloi_true.
        ENDIF.
      ENDIF.
    -> check if order was already sent
      IF NOT gt_aufnrdone[] IS INITIAL.                         "N599845
        READ TABLE gt_aufnrdone WITH KEY                        "N599845
          low = ioheader-aufnr                                  "N599845
          TRANSPORTING NO FIELDS                                "N599845
          BINARY SEARCH.                                        "N599845
        IF sy-subrc = 0.                                        "N599845
        -> order already sent
          check_flg = cloi_true.                                "N599845
        ENDIF.                                                  "N599845
      ENDIF.                                                    "N599845
    leave GET routine if check_flg is set.
      CHECK check_flg IS INITIAL.
      CLEAR t_afpo. REFRESH t_afpo.
      CLEAR t_affl. REFRESH t_affl.
      MOVE-CORRESPONDING ioheader TO t_afko.
    GET ioheader LATE.
    BEGIN OF INSERTION DS001
    Check whether the process order has been changed since the last
    run of the program
    clear f_continue.
    if the CHANGED date is greater than the last run or initial
    IF IOHEADER-AEDAT  GT F_OLD_DATE OR
           ( ioheader-aedat  is initial and
             ioheader-aezeit is initial ).
    if the CHANGED date is initial check the creation date
       if ioheader-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
         IF IOHEADER-ERDAT GT F_OLD_DATE OR
            ( IOHEADER-ERDAT EQ F_OLD_DATE AND
              IOHEADER-ERFZEIT GE F_OLD_TIME ).
           f_continue = 'X'.
         endif.
       else.
         f_continue = 'X'.
       endif.
    if the CHANGED dat is not initial check it against the last run
    ELSEIF IOHEADER-AEDAT  EQ F_OLD_DATE AND
            IOHEADER-AEZEIT GE F_OLD_TIME.
       f_continue ='X'.
    endif.
    Aenderung 295/99  Selektions-Aenderung vom 26. August 99
    Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
    erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
    CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
    SELECT SINGLE * FROM JEST
                     WHERE OBJNR = F_OBJNR
                     AND   STAT  = 'I0045'.
    IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
       SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
                                STAT  EQ 'I0045' AND
                                INACT EQ SPACE.
    letzte Aenderung des Status TABG wird geprueft    Beg. WA 354/99
       ENDSELECT.
      IF ( F_OLD_DATE GT JCDS-UDATE OR                         " Beg JB_02
          ( F_OLD_DATE EQ JCDS-UDATE AND
           F_OLD_TIME GT JCDS-UTIME ) ) AND                    " End JB_02
          SY-SUBRC EQ 0.
         CLEAR F_CONTINUE.
       ENDIF.
    ENDIF.
    Ende 295/99
    check f_continue eq 'X'.
    END OF INSERTION DS001
      t_afko-t_afpo = t_afpo[].
      t_afko-t_jstk = t_jstk[].
      t_afko-t_affl = t_affl[].
      t_afko-t_afab = t_afab[].
      APPEND t_afko.
      IF jstk_x = cloi_x.
        t_objnr-objnr = ioheader-objnr.
        APPEND t_objnr.
      ENDIF.
    *---> Remember the orders that are already selected for the global
        selection parameters
      IF ordtomem = cloi_x.                "write order numbers to memory
        t_aufnr_range_done-sign = 'I'.
        t_aufnr_range_done-option = 'NE'.
        t_aufnr_range_done-low = ioheader-aufpl.
        APPEND t_aufnr_range_done.
      ENDIF.
    *---> Remember the orders internal/external keys for AFAB (relationship)
      IF afab_x = cloi_x.
        MOVE-CORRESPONDING ioheader TO t_aufpl_aufnr.
        APPEND t_aufpl_aufnr.
      ENDIF.
    check afpo_x = cloi_x.
    GET ioitem.
    BEGIN OF INSERTION DS001
    Check whether the process order has been changed since the last
    run of the program
    CLEAR F_CONTINUE.
    if the CHANGED date is greater than the last run or initial
    IF IOHEADER-AEDAT  GT F_OLD_DATE OR
           ( ioheader-aedat  is initial and
             ioheader-aezeit is initial ).
    if the CHANGED date is initial check the creation date
       if ioheader-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
         IF IOHEADER-ERDAT GT F_OLD_DATE OR
            ( IOHEADER-ERDAT EQ F_OLD_DATE AND
              IOHEADER-ERFZEIT GE F_OLD_TIME ).
           f_continue = 'X'.
         endif.
       else.
         f_continue = 'X'.
       endif.
    if the CHANGED date is not initial check it against the last run
    ELSEIF IOHEADER-AEDAT  EQ F_OLD_DATE AND
            IOHEADER-AEZEIT GE F_OLD_TIME.
       f_continue ='X'.
    endif.
    Aenderung 295/99  Selektions-Aenderung vom 26. August 99
    Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
    erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
    CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
    SELECT SINGLE * FROM JEST
                     WHERE OBJNR = F_OBJNR
                     AND   STAT  = 'I0045'.
    IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
       SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
                                STAT  EQ 'I0045' AND
                                INACT EQ SPACE.
    letzte Aenderung des Status TABG wird geprueft
       ENDSELECT.
      IF ( F_OLD_DATE GT JCDS-UDATE OR                         " Beg JB_02
          ( F_OLD_DATE EQ JCDS-UDATE AND
           F_OLD_TIME GT JCDS-UTIME ) ) AND                    " End JB_02
          SY-SUBRC EQ 0.
         CLEAR F_CONTINUE.
       ENDIF.
    ENDIF.
    Ende 295/99
    check f_continue eq 'X'.
    END OF INSERTION DS001
      IF afpo_x = cloi_x.
        MOVE-CORRESPONDING ioitem TO t_afpo.
        APPEND t_afpo.
      ENDIF.
    Put matnr and ltrmi in a help structure, which later goes to t_afpo
      IF ioitem-posnr = '0001'.
        MOVE-CORRESPONDING ioitem TO help_afpo.
        APPEND help_afpo.
    put PSP element (internal key) into order header. Unique for positions
        IF t_afko-pspel IS INITIAL.
          t_afko-pspel = ioitem-projn.
        ENDIF.
      ENDIF.
      CHECK affl_x = cloi_x.
    GET iosequen.
      CLEAR t_afvo. REFRESH t_afvo.
      MOVE-CORRESPONDING iosequen TO t_affl.
    GET iosequen LATE.
      t_affl-t_afvo = t_afvo[].
      APPEND t_affl.
      CHECK afvo_x = cloi_x.
    GET iooper.
      CLEAR t_kbed. REFRESH t_kbed.
      CLEAR t_afuv. REFRESH t_afuv.
      CLEAR t_resb. REFRESH t_resb.
      MOVE-CORRESPONDING iooper TO t_afvo.
      "Temporary storing of operation information if for a phase
      "the corresponding operation has is needed
      MOVE-CORRESPONDING iooper TO t_aufpl_aplzl_vornr.
      APPEND t_aufpl_aplzl_vornr.
    check, if selection profile (if exists) for the operation is ok
      IF NOT ord_opr_selid IS INITIAL.
        CALL FUNCTION 'STATUS_CHECK_BY_SELSCHEM'
             EXPORTING
                  objnr          = iooper-objnr
                  selid          = ord_opr_selid
             IMPORTING
                  fullfill       = status_ok
             EXCEPTIONS
                  no_stat_tab    = 1
                  no_stat_scheme = 2
                  OTHERS         = 3.
        IF sy-subrc <> 0.
          status_ok = cloi_x.
        ENDIF.
      ELSE.
        status_ok = cloi_x.
      ENDIF.
    check if control key (STEUS) should not be selected.
      control_key_ok = cloi_x.
      IF no_entry_for_logsys IS INITIAL.
        READ TABLE t_steus WITH KEY
             steus = iooper-steus BINARY SEARCH.
        IF sy-subrc <> 0.
          CLEAR control_key_ok.
        ENDIF.
      ENDIF.
      CHECK NOT status_ok IS INITIAL.
      CHECK NOT control_key_ok IS INITIAL.
    GET iooper LATE.
      t_afvo-t_kbed = t_kbed[].
      t_afvo-t_afuv = t_afuv[].
      t_afvo-t_resb = t_resb[].
      APPEND t_afvo.
      IF jstv_x = cloi_x.
        t_objnr-objnr = iooper-objnr.
        APPEND t_objnr.
      ENDIF.
      CHECK kbed_x = cloi_x.
    GET ioopcap.
      MOVE-CORRESPONDING ioopcap TO t_kbed.
      APPEND t_kbed.
      CHECK resb_x = cloi_x.
    GET ioopcomp.
    do not transfer RESB entries with deletion flag
      CHECK ioopcomp-xloek IS INITIAL.
      MOVE-CORRESPONDING ioopcomp TO t_resb.
      APPEND t_resb.
      CHECK afuv_x = cloi_x.
    GET iosoper.
      CLEAR t_kbeu. REFRESH t_kbeu.
      MOVE-CORRESPONDING iosoper TO t_afuv.
    check if control key (STEUS) should not be selected.
      control_key_ok = cloi_x.
      IF no_entry_for_logsys IS INITIAL.
        READ TABLE t_steus WITH KEY
             steus = iooper-steus BINARY SEARCH.
        IF sy-subrc <> 0.
          CLEAR control_key_ok.
        ENDIF.
      ENDIF.
      CHECK NOT control_key_ok IS INITIAL.
    GET iosoper LATE.
      t_afuv-t_kbeu = t_kbeu[].
      APPEND t_afuv.
      IF jstv_x = cloi_x.
        t_objnr-objnr = iosoper-objnr.
        APPEND t_objnr.
      ENDIF.
      CHECK kbeu_x = cloi_x.
    GET iosocap.
      MOVE-CORRESPONDING iosocap TO t_kbeu.
      APPEND t_kbeu.
    *&   Event END-OF-SELECTION
    END-OF-SELECTION.
    *MOD-006
      DATA: itab_matnr TYPE zzzz_xref_data OCCURS 0.
      DATA: l_wa_matnr TYPE zzzz_xref_data.
      DATA: l_wa_matnr_value TYPE zzzz_xref_data-z_in_value.
      DATA: l_wa_afko TYPE  cloi_afko_struct.
    SELECT *
      FROM zzzz_xref_data
    APPENDING TABLE itab_matnr
    WHERE trans_id = 'ZELCUSMATLOOKUP' AND
           ( z_in_value IN s_matnr OR
             z_out_value IN s_matnr ).
    IF sy-subrc = 0.
         LOOP AT ITAB_MATNR INTO L_WA_MATNR.
           L_WA_MATNR_VALUE = L_WA_MATNR-z_OUT_VALUE.
           S_MATNR-LOW = L_WA_MATNR_VALUE.
           S_MATNR-SIGN = 'I'.
           S_MATNR-OPTION = 'EQ'.
           APPEND S_MATNR.
         ENDLOOP.
       DELETE itab_matnr WHERE NOT in_value IN s_emat.
       SORT itab_matnr BY out_value.
    ENDIF.
    CLEAR: l_wa_matnr.
    **MOD-010
    Data which is not in the material lookup table but in the T_AFKO.
      LOOP AT t_afko INTO l_wa_afko.
       READ TABLE S_MATNR WITH KEY LOW = L_WA_AFKO-MATNR BINARY SEARCH.
        READ TABLE itab_matnr INTO l_wa_matnr
            WITH KEY z_out_value = l_wa_afko-matnr BINARY SEARCH.
        IF sy-subrc NE 0.
          l_wa_afko-rgekz = 'X'.
          MODIFY t_afko FROM l_wa_afko  TRANSPORTING rgekz.
        ENDIF.
       IF NOT P_DATE IS INITIAL.
         IF T_AFKO-GSTRP < p_date OR
                 ( T_AFKO-GSTRP = p_date AND
                   T_AFKO-GSUZP > p_time ).
           L_WA_AFKO-RGEKZ = 'X'.
           MODIFY T_AFKO FROM L_WA_AFKO  TRANSPORTING RGEKZ.
         ENDIF.
       ENDIF.
      ENDLOOP.
    Delete  Data which is not in the material lookup
    table but in the T_AFKO.
    DELETE t_afko WHERE rgekz = 'X'.
    *MOD-010
    *MOD-006
    BEGIN OF INSERTION DS001
      DATA: l_wa_itab_date TYPE ty_date.
    Check whether the process order has been changed since the last
    run of the program
      CLEAR f_continue.
      IF NOT t_afko IS INITIAL.
        SELECT aufnr aedat aezeit erdat erfzeit loekz
        INTO TABLE itab_date
        FROM aufk
        FOR ALL ENTRIES IN t_afko
        WHERE aufnr = t_afko-aufnr.
        IF sy-subrc = 0.
          IF NOT p_date IS INITIAL.
            CLEAR: itab_date.
    Check whether the process order has been changed since the last
    run of the program
            LOOP AT itab_date INTO l_wa_itab_date.
    if the CHANGED date is greater than the last run or initial
              IF l_wa_itab_date-aedat GT p_date OR
                    ( l_wa_itab_date-aedat  IS INITIAL AND
                      l_wa_itab_date-aezeit IS INITIAL ).
    if the CHANGED date is initial check the creation date
                IF l_wa_itab_date-aedat IS INITIAL.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
                  IF l_wa_itab_date-erdat GT p_date OR
                     ( l_wa_itab_date-erdat EQ p_date AND
                       l_wa_itab_date-erfzeit GE p_time ).
                    f_continue = 'X'.
                  ELSE.
                    l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
                  ENDIF.
                ELSE.
                  f_continue = 'X'.
                ENDIF.
    if the CHANGED dat is not initial check it against the last run
              ELSEIF l_wa_itab_date-aedat  EQ p_date AND
                     l_wa_itab_date-aezeit GE p_time.
                f_continue ='X'.
              ELSE.
                l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
              ENDIF.
            ENDLOOP.
    *MOD-006
      ELSE.
         CLEAR: ITAB_DATE.
         LOOP AT ITAB_DATE INTO L_WA_ITAB_DATE.
    if the CHANGED date is greater than the last run or initial
           IF L_WA_ITAB_DATE-AEDAT GT P_RUNDT OR
                 ( L_WA_ITAB_DATE-aedat  is initial and
                   L_WA_ITAB_DATE-aezeit is initial ).
    if the CHANGED date is initial check the creation date
             if l_wa_itab_date-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
               IF L_WA_ITAB_DATE-ERDAT GT P_RUNDT OR
                  ( L_WA_ITAB_DATE-ERDAT EQ P_RUNDT AND
                    L_WA_ITAB_DATE-ERFZEIT GE S_RUNTM-LOW OR
                    L_WA_ITAB_DATE-ERFZEIT LE S_RUNTM-HIGH ).
                 f_continue = 'X'.
               else.
                 l_wa_itab_date-indicator = 'X'.
                 MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
                                   TRANSPORTING INDICATOR.
               endif.
             else.
               f_continue = 'X'.
             endif.
    if the CHANGED dat is not initial check it against the last run
           ELSEIF L_WA_ITAB_DATE-AEDAT  EQ P_RUNDT AND
                  L_WA_ITAB_DATE-AEZEIT GE S_RUNTM-LOW.
             f_continue ='X'.
           ELSE.
             l_wa_itab_date-indicator = 'X'.
             MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
                                TRANSPORTING INDICATOR.
           endif.
         ENDLOOP.
    *MOD-006
          ENDIF.
        ENDIF.
      ENDIF.
    DELETE ITAB_DATE WHERE INDICATOR = 'X'.
    *MOD-006
      CLEAR: itab_date.
      IF s_rundt-high IS INITIAL AND NOT s_rundt IS INITIAL.
        s_rundt-high = sy-datum.
      ENDIF.
      LOOP AT itab_date INTO l_wa_itab_date.
        IF NOT s_rundt IS INITIAL.
    if the CHANGED date is greater than the last run or initial
          IF    ( l_wa_itab_date-aedat  IS INITIAL AND
                  l_wa_itab_date-aezeit IS INITIAL ).
    if the CHANGED date is initial check the creation date
            IF l_wa_itab_date-aedat IS INITIAL.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
              IF ( l_wa_itab_date-erdat GT s_rundt-low AND
                 l_wa_itab_date-erfzeit GT s_runtm-low ) AND
                 ( l_wa_itab_date-erdat LT s_rundt-high AND
                 l_wa_itab_date-erfzeit LT s_runtm-high ).
                f_continue = 'X'.
              ELSE.
                l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date
                                  TRANSPORTING indicator.
              ENDIF.
            ELSE.
              f_continue = 'X'.
            ENDIF.
    if the CHANGED dat is not initial check it against the last run
          ELSEIF ( l_wa_itab_date-aedat  GE s_rundt-low AND
                  l_wa_itab_date-aezeit  GE s_runtm-low ) AND
                 ( l_wa_itab_date-aedat  LE s_rundt-high AND
                 l_wa_itab_date-aezeit LE s_runtm-high ).
            f_continue ='X'.
          ELSE.
            l_wa_itab_date-indicator = 'X'.
            MODIFY itab_date FROM l_wa_itab_date
                               TRANSPORTING indicator.
          ENDIF.
        ENDIF.
      ENDLOOP.
    DELETE itab_date WHERE indicator = 'X'.
    *MOD-006
    **MOD-006
    LOOP AT t_afko INTO l_wa_afko.
       READ TABLE itab_date INTO l_wa_itab_date
                WITH KEY aufnr = l_wa_afko-aufnr BINARY SEARCH.
       IF sy-subrc NE 0.
         l_wa_afko-rgekz = 'X'.
         MODIFY t_afko FROM l_wa_afko  TRANSPORTING rgekz.
       ENDIF.
    ENDLOOP.
    DELETE t_afko WHERE rgekz = 'X'.
    **MOD-006
    -> initialize logical data base to reduce memory consumption
      PERFORM ldb_process_init(sapdbioc)
        CHANGING
          lv_subrc.
    --> add information to the order structure that is not
        selected via logical database:
        - if AFVO-entry is a phase (phflg) --> fill field for
          corresponding operation number (PVZNR)
          The internal node number (aplzl) of the corresponding operation
          is in field PVZKN of the phase
        - relationship information: E1AFABL
          especially: select external numbers for the used
          internal numbers in the table AFAB
        - status information of the order header: E1JSTKL
        - status information of the operation: E1JSTVL
    --> Put matnr and ltrmi in the table t_afko
      SORT t_afko BY aufnr.
      LOOP AT help_afpo.
        READ TABLE t_afko WITH KEY aufnr = help_afpo-aufnr
          ASSIGNING -gltri = help_afpo-ltrmi.
        ENDIF.
      ENDLOOP.
    --> Select entries for order and operation status
      IF NOT t_objnr[] IS INITIAL.
        SELECT objnr stat FROM jest INTO TABLE t_jest2
          FOR ALL ENTRIES IN t_objnr
          WHERE objnr = t_objnr-objnr
          AND   inact <> 'X'.
      ENDIF.
    --> Select entries for relationships from afab for all orders
        into table t_afab_tmp
      SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
      IF afab_x = cloi_x AND NOT t_aufpl_aufnr[] IS INITIAL.
      -> select afab data
        SELECT * FROM afab INTO TABLE t_afab_tmp
          FOR ALL ENTRIES IN t_aufpl_aufnr
          WHERE aufpl_vor = t_aufpl_aufnr-aufpl.
        SELECT * FROM afab APPENDING TABLE t_afab_tmp
          FOR ALL ENTRIES IN t_aufpl_aufnr
          WHERE aufpl_nch = t_aufpl_aufnr-aufpl.
        SORT t_afab_tmp
          BY aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
        DELETE ADJACENT DUPLICATES FROM t_afab_tmp
          COMPARING aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
      -> read external order numbers out of data base
        CLEAR t_aufpl. REFRESH t_aufpl.
        LOOP AT t_afab_tmp ASSIGNING -aufpl_nch.
          COLLECT t_aufpl.
        ENDLOOP.
        CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
        IF NOT t_aufpl[] IS INITIAL.
          SELECT aufpl aufnr FROM afko INTO TABLE t_aufpl_aufnr
            FOR ALL ENTRIES IN t_aufpl
            WHERE aufpl = t_aufpl-aufpl.
          SORT t_aufpl_aufnr BY aufpl.
        ENDIF.
      -> add order numbers to afab data
        LOOP AT t_afab_tmp ASSIGNING -aufnr_nch = t_aufpl_aufnr-aufnr.
          ENDIF.
        ENDLOOP.
      -> read operation numbers out of data base
        CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
        LOOP AT t_afab_tmp ASSIGNING -aplzl_nch.
          COLLECT t_aufpl_aplzl.
        ENDLOOP.
        IF NOT t_aufpl_aplzl[] IS INITIAL.
          SELECT aufpl aplzl vornr FROM afvc
            APPENDING TABLE t_aufpl_aplzl_vornr
            FOR ALL ENTRIES IN t_aufpl_aplzl
            WHERE aufpl = t_aufpl_aplzl-aufpl
              AND aplzl = t_aufpl_aplzl-aplzl.
          SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
        ENDIF.
      -> add operation numbers to afab data
        LOOP AT t_afab_tmp ASSIGNING -vornr_nch = t_aufpl_aplzl_vornr-vornr.
          ENDIF.
        ENDLOOP.
      ENDIF.                               "afab_x
    --> fill AFAB (relationship information) and status information
      SORT t_aufpl_aufnr BY aufnr.
      LOOP AT t_afko ASSIGNING .
      -> fill order head status information
        IF jstk_x = cloi_x.
          CLEAR t_jstk. REFRESH t_jstk.
          LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstk = t_jstk[].
        ENDIF.
      -> fill afab information
        IF afab_x = cloi_x.
          CLEAR t_aufpl_aufnr.
          READ TABLE t_aufpl_aufnr WITH KEY
            aufnr = -t_afab = t_afab[].
        ENDIF.
      -> fill operation and suboperation status information
        IF jstv_x = cloi_x OR afvo_x = cloi_x.
          LOOP AT .
            -> read status information of suboperation
              IF jstu_x = cloi_x.
                LOOP AT -t_jstu = t_jstu[].
                ENDLOOP.
              ENDIF.
            -> read status information of operation
              IF jstv_x = cloi_x.
                CLEAR t_jstv. REFRESH t_jstv.
                LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstv = t_jstv[].
              ENDIF.
            -> Read operation for a phase
              IF NOT -pvznr = t_aufpl_aplzl_vornr-vornr.
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDLOOP.
        ENDIF.
      -> collect order numbers
        CLEAR wa_aufnrdone.
        wa_aufnrdone-low = -aufnr.
        APPEND wa_aufnrdone TO lt_aufnrdone.
      ENDLOOP.
    -> append collected order numbers to global table
      APPEND LINES OF lt_aufnrdone TO gt_aufnrdone.
      EXPORT gt_aufnrdone TO MEMORY ID 'LOIAUFNRTAB'.
    -> free large tables
      CLEAR t_jest2. REFRESH t_jest2.
      CLEAR t_afab_tmp. REFRESH t_afab_tmp.
      CLEAR t_aufpl. REFRESH t_aufpl.
      CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
      CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
      CLEAR t_aufpl_aplzl_vornr. REFRESH t_aufpl_aplzl_vornr.
    -> create idocs
      CALL FUNCTION 'CLOI_MASTERIDOC_CREATE_LOIPRO'
           EXPORTING
                opt_sys      = opt_sys
                message_type = mestyp
           TABLES
                order_data   = t_afko
           EXCEPTIONS
                OTHERS       = 1.
    -> export already selected order numbers via ranges tab to memory
      EXPORT t_aufnr_range_done TO MEMORY ID 'LOI002'.
    **MOD-006
    IMPORT created_masteridocs_pro FROM MEMORY ID 'YLOI001'.
    ycloidownlprot-end_date       = sy-datum.
    ycloidownlprot-end_time       = sy-uzeit.
    ycloidownlprot-idocs_selected = created_masteridocs_pro.
    ycloidownlprot-in_progress    = cloi_false.
    insert or update entry (dependant if entry already exists)
    MODIFY ycloidownlprot.
    COMMIT WORK.
    MESSAGE i967(z001) WITH created_masteridocs_pro.
    **MOD-006
    Update last run date and time
      IF p_update = 'X'.
        PERFORM update_last_run.
      ELSE.
      MESSAGE s000 WITH text-022.
        "Last Run Date and Last Run Time not updated
        LEAVE LIST-PROCESSING.
      ENDIF.
      INCLUDE rcordf01.
    *&      Form  validate_last_run_date_time
          text
    -->  p1        text
    <--  p2        text
    *FORM validate_last_run_date_time.
    IF p_date IS INITIAL OR
        p_time IS INITIAL.
       IF sy-batch IS INITIAL.
         MESSAGE s000 WITH text-017.
         "Last Run date & Last Run Time can not be blank
         LEAVE LIST-PROCESSING.
       ELSE.
         MESSAGE e000 WITH text-017.
         "Last Run date & Last Run Time can not be blank
       ENDIF.
    ENDIF.
    *ENDFORM.                    " validate_last_run_date_time
    *&      Form  update_last_run
          text
    -->  p1        text
    <--  p2        text
    FORM update_last_run.
      CONSTANTS:
            l_c_name    TYPE rvari_vnam  VALUE 'Z_PROC_DATE',
            l_c_name1   TYPE rvari_vnam  VALUE 'Z_PROC_TIME',
            l_c_type    TYPE rsscr_kind  VALUE 'P',
            l_c_numb    TYPE tvarv_numb  VALUE '0000'.
    Update last run date
      UPDATE tvarv SET low  = sy-datum
                 WHERE name = l_c_name AND
                       type = l_c_type AND
                       numb = l_c_numb.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        g_run_date = text-015. "#EC
        "Updation of TVARV table failed for ZLAST_RUN_DATE. Update manually
      ENDIF.
    Update last run time
      UPDATE tvarv SET low  = sy-uzeit
                 WHERE name = l_c_name1 AND
                       type = l_c_type AND
                       numb = l_c_numb.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        g_run_time = text-016. "#EC
        "Updation of TVARV table failed for ZLAST_RUN_TIME. Update manually
      ENDIF.
    ENDFORM.                    " update_last_run

  • PO Delivery date change using IDOC type "PORDCR101"

    Hi All,
    I am trying to create a PO using idoc type "PORDCR101". Everything is fine, PO is getting created. But the problem is that, even if I pass delivery date at item level system is automatically changing delivery date to future date (some of the PO's have delivery date in past and they need to be created as it is).
    I am populating all the required fields (PO_ITEM, SCHED_LINE, DEL_DATCAT_EXT, DELIVERY_DATE, QUANTITY, STAT_DATE) in both the segements "E1BPMEPOSCHEDULE" and "E1BPMEPOSCHEDULEX" (in this segement with X). It's updating the quantity exactly with what I am passing, but it's not considering delivery date. But when I am creating PO manually using ME21N I am able to set delivery date to past date.
    E1BPMEPOSCHEDULE
    PO_ITEM=20
    SCHED_LINE=0001
    DEL_DATCAT_EXT=1
    DELIVERY_DATE=20060509
    QUANTITY=101584
    STAT_DATE=20060509
    E1BPMEPOSCHEDULEX
    PO_ITEM=20
    SCHED_LINE=0001
    PO_ITEMX     =X
    SCHED_LINEX=X
    DEL_DATCAT_EXT=X
    DELIVERY_DATE=X
    QUANTITY=X
    The funny part is IDOC is not even thowing a warning message for this...
    Any idea what I am missing???
    Thanks for your time.
    Paul
    null

    Ok, I got the answer. For delivery date category (DEL_DATCAT_EXT) we should not be passing 1, but we have to convert it into 'D' (And relevant format for others).

  • Sales Order line item status change using STATUS_UPDATE

    Hi all,
    I need to change status of a Sales order item during (VA02) transaction. I have written an user-exit in MV45AFZZ (perform user_exit save_document_prepare- using STATUS_UPDATE FM and passing appropriate values to JEST_UPD and JEST_INS table for the FM. If the user chooses a status while changing the SO line item, it should be over written by another status which I supply in the user-exit.
    How can i achieve this? Please let me know if someone has achieved this?
    Thanks
    Ricky

    Hi Ricky,
    Instead of user exit , if you want to maintain a status update at the sales order item.
    Go to BS02 and create a status profile when you can give the approval and rejection node. also maintain the business transaction according to business requirement
    than go to vov7 and maintain this status profile at the item level.
    Try it out it will definately work.
    Regards,
    SAPSD000 ...

  • Getting an error to order a VM for Linux using a Template

    Hi All,
    I have tried to submit the order  a VM for Linux RHEL6.1.
    Portal page is not showing the Administrator Password's   "Enter and Renter" tabs on the page and the message showing on the the tab space is as follows:
    Important: To set the root password on  your virtual machine, please refer to the appropriate restrictions for your  Linux operating system flavor.
    I have created root password on the RHEL OS itself
    I submitted the order after that it is showing the error as follows:
    Can any one help me on this how isolate this issue..?
    Thank in Advance.
    -Noor.

    Hello,
    Unfortunately there is not enough information here. It is possible that some of the configuration steps have not completed successfully. Without seeing adding screenshots or XMLs it might be hard to answer this question.
    Could you please open TAC case? They woudl be able to answer it quickly.
    Also, is this question about Cloud Solution or Workplace Solution?
    Thanks,
    Max.

  • Error entering data in a data form using Smart View

    One of my user is facing an issue while entering data in a data form through Excel, if she uses the same data form in workspace she is able to enter data. She is facing the issue while entering in a specific column, for all other columns she is able to enter data in the data form. It is only one column for which she is facing issue while using smart view/excel and not workspace, as in workspace she is able to enter data.
    Thanks,

    Hi
    Check they have the "Data Form Write Back from Excel" role in Shared Services.
    See p.133 of the security guide for more info -
    http://docs.oracle.com/cd/E17236_01/epm.1112/hss_admin_1112200.pdf
    Regards
    jpr

  • Error while uploading the Real Estate Contract using IDOC & BAPI

    Hi  All ,
    I am trying to uploading the real estate contract data  by using  LSMW IDOC & BAPI methods  .
    In IDOC method I have used the Basic type as BUS1505_CREATE01 and Message type as BUS1505_CREATE. I have passed all mandatory fields then also i am unable to create the CONTRACT but and i am able to create CONTRACT using the bapi BAPI_RE_CN_CREATE  by passing the  values in SE37 and  i am able create CONTRACT manually in transaction code RECN  . Can any body know the reason .
    In BAPI method I have used the Business Object  BUS1505  ,Method CREATE  ,Message type BUS1505_CREATE and Basic type  BUS1505_CREATE03 . I have passed all the mandatory fields then also  i am unable  create the CONTRACT But with the same fields i am able create CONTRACT manually in transaction code RECN and i am able to create CONTRACT using the bapi BAPI_RE_CN_CREATE  by passing the  values in SE37  .
    Regards
    Srihari

    Hi All,
      I was passing blank entries so the above errors were coming. I removed those blank entries and now Im getting error like .
    "Individual renewal rule does not contain any extension periods"
    "No instance of object type ContractREFX has been created. External reference: REC <NEW>'.

  • Material Change using idoc

    Hi Experts,
    Need your advise,
    Actually my scenario is, that i am creating the Material using inbound idoc with Basic Type: MATMAS05 and Message Type: MATMAS,
    now i need to change the same material, how can i achieve that??
    Say, I have created a Material with MATNR: ABC using inbound MATMAS idoc, now how can i change it??
    Aayush

    It always depends on what you need to change.
    In general you just need a new IDOC with the new values for the same material number.
    It will automatically overwrite the old values, except you want to change values that are no longer allowed to be changed.

  • Create a Sales Order with Reference to Contract using IDoc / LSMW  ( AFS )

    Hi Gurus,
    I need to crate a Sales Order with reference to a Contract. I need to upload Sales Orders with reference to contract via LSMW.
    So far, I've been able to create the Sales Order with ref to contract. But, the Sales Order Quantity is not getting deducted from the Original Qty in Referred Contract ( When try to create another Sales Order referring to the same Contract.) When a Sales Order is created manually, this is working fine.
    Please tell me if I've missed some parameter which stopping it create the link to exact schedule line ( Sizes level )
    The Details of the IDoc which is been created via LSMW are as follows;
    Message Type: ORDERS
    Basic Type     : /AFS/ORDERS05
    Process Code : ORDE / DELO
    ( Tried with both process codes.  But the Identification is the same for both: IDOC_INPUT_ORDERS )
    *_In Header;_
    Segment : E1EDK02  - IDoc: Document header reference data *
    Qualifier : '043' - Vendor Contract Number ( Tried with ' 005' - Customer Contract, but it's not working )
    Contract Order is mapped for field BELNR
    *_In Item;_
    Segment : E1EDP02  - IDoc: Document Item Reference Data *
    Qualifier : '043' - Vendor Contract Number ( Tried with ' 005' - Customer Contract, but it's not working )
    Contract Order is mapped to field BELNR
    Line Item of the Contract is mapped to field ZEILE
    I also tried passing the Schedule line of Contract in Segment :  E1J3P01 AFS IDoc: Doc.item general data
    to following fields;
    J_3AETENV
    J_3AVGETE
    /AFS/UETENR
    Still its not getting updated in the VBEP also..
    Please help me with regard to this. Points will be awarded for your valuable contribution.
    Thanks.

    Hi,
    This issue is been resolved.
    One of my friend helped me with resolving this issue..
    Once the below mentioned configurations were done on SPRO, the Sales Order was created with reference to Contract and the Qty was reflected when tried to create a new Order referring the same contract.;
    u2022     SPRO --> SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Define Sales Document Types  --> Field : Outline agreement message; from blank to u201CBu201D.
    u2022     SPRO  -->SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Maintain Sales Document Types for AFS  --> Field : Outline agreement message; from blank to u201CAu201D

  • PO error in Process-Order Unit PU not convertible into unit lot of req

    Hi ALL,
    SRM 5.0 SP13 ECS
    Service based req with order unit LOT was pushed to SRM . SC got approved in SRM with order unit LOT, PO got approved with order unit LOT and now the PO is in error in process state. I looked up RZ20 to find the message "Order unit PU not covertible into unit Lot of req. We are using material groups and not material masters.
    Any idea what is causing this error? order unit seems to be the same, right though the scenario, It was never tried to change at any point of time in the cycle
    Krishna

    krishna
    update here your findings.it helps others too when they are in trouble.
    Muthu

  • Order unit cannot be used

    Hi Gurus,
    Our requirement is to used the order unit.. we have previous purchase order using the base unit of material and then i update the material indicating required order unit. When we create the Purchase Order some material did not hook the order unit for example base unit= EA(each) and order unit=REA(ream) in the PO EA reflect instead of REA
    and i want the order unit will be in the purchase order i try to change but the message pop-up "Order unit REA cannot be used"
    what will i do? I'm confuse why other material it's ok in order unit and some why did catch the order unit?
    hoping to your possible solution..
    Thanks,
    Marina

    Hi Velu,
    here the informartion regarding the message:
    Order unit REA cannot be used
    Message no. ME898
    Diagnosis
    Unit REA is not intented as an order unit.
    System Response
    The system checks whether the order unit you entered is allowed for this purchase order by comparing the order unit you entered with the order unit that the system determined.
    The system checks the potential sources of the order unit in the given sequence. If a source is not available (if the purchase order is not referenced to a preceding document, for example) then the system checks the next possible source (such as a purchase requisition):
    1. If you create a purchase order with reference to a preceding document (purchase order, contract or request for quotation), the system copies the order unit from the preceding document.
    The Var. OUn (Variable order unit) indicator must not be selected in the purchasing info record.
    2. If you create a purchase order with reference to a purchase requisition and the Var. OUn indicator is selected in the purchasing info record, the system copies the order unit from the purchase requisition.
    In the Enjoy purchase requisition (ME51N), you can maintain the order unit on the item detail screen on the Source of supply tab. In the normal purchase requisition (ME51), you can maintain the order unit on the item details screen.
    3. When the purchasing info record for the combination of vendor and material exists, the system copies the order unit from the purchasing info record.
    4. If you create a purchase order with reference to a purchase requisition and the Var. OUn is not selected in the purchasing info record, the system copies the order unit from the purchase requisition.
    5. If you create a purchase order with reference to a purchase requisition and there is no existing purchase info record for the combination of vendor and material, then the system copies the unit of measure from the purchase requisition item in the item overview.
    6. If you create a normal purchase order, the system copies the order unit from the material master.
    7. When you create a stock transport order, the system copies the unit of measure from the material master.
    8. If the order unit and the unit of measure were not defined in the material master, the system copies the material's base unit of measure.
    9. If you create a service item, the system copies the default unit of measure.
    You can define the default unit of measure in Customizing for External Services Management under Source Determination and Default Values -> for Client.
    Note
    If the Var. OUn indicator is selected in the purchasing info record or in the material master (if no purchasing info records exist), it means that the system can use any unit of measure that has been defined in the material master.
    Procedure
    1. Check the relevant documents and master records (contract or purchasing info records).
    2. Select the Var. OUn in the purchasing info record or in the material master, if necessary.
    thanks,
    Marina

  • Bapi_po_create1 Order unit cannot be used

    Hello everyone,
    I'm using the BAPI_PO_CREATE1 to create a purchase order, but it's giving me the following error:
    "Order unit MGW cannot be used", i'm using a material with the unit MGW defined in MM02.
    Any ideas?
    Thanks,
    Fábio Galvã

    Thanks for all the replies,
    I've given points to all the helpfull replies.
    I've managed to create the PO with the unit I wanted, MGW, butt it only placed the unit in 'Order Price Unit (Purchasing)' and placed UN on 'Purchase Order Unit of Measure'. My requirement is to create a PO with MGW on both fields.
    Is there any other field I need to fill so that the BAPI creates a PO like I need?
    Thank you,
    Fábio Galvã

  • TEXT material in Sales Order - Unit of Measurement is blank

    We need to trigger a PR from a text item in sales order.
    Only problem we are facing is an error message saying "Enter Order Unit". But there is no value in F4 help for order unit. There is no permissible value for unit of measure in F4 help, as it is derived from material master.

    here is the exact requirement. We want to trigger a PR for procurement of services from a sales order. To trigger a PR for services and use service entry sheet for service confirmation we need to use item category D-Services in the PR and PO. Item category D does not allow a material to be entered as there will be no invetory tracking for this services. This is standard SAP property for item category D in the PR.
    So to trigger a PR only with a text line from a sales order you need to have a sales order line item only with the text and trigger a schedule line category with the order type NB, Item category as D and account assignment category as R.

Maybe you are looking for

  • Calculate fields do not work

    I am fairly new to working with Adobe Acrobat 9 Pro, JAVA Scripts, and PDF files. So this may sound as a newby question. I have a PDF that has tons of fields that are filled in under program control from a database. When the PDF is rendered to my MVC

  • Website not displayed properly

    I am professional blogger and writes on my website http://www.2013ipl.in and http://www.iplfan.com for IPL related stuff which is sports events. I am using Worldwidelab theme which is using Wordpress platform. When I see my website using Mozilla for

  • Difference between Oracle Testing Center and Prometric?

    what is the Difference between Oracle Testing Center and Prometric?

  • Bridged networking not working with nested VMware Workstation

    I am having an issue that I can't seem to find any answer to....  We are running Vsphere 5.5 and I have 2 Guests each running Windows 7 64-bit.  Each of these guests has VMware Workstation 10 running on them.  When we P2V the systems we followed all

  • Pre 8 presets

    Hi,  I have used Pre 4 successfully since it was released with a Sony HC5 camera. I just bought a Sony HDR-XR550 camera which records in AVCHD. I have it set to record in 1920 X 1080/60i format. I am just gettig started with Pre 8 and was unsure of w