FM FOR CREATING NEW CONDITION RECORDS FROM INPUT FILE

Hello vikas,
I need to develop a interface program FOR CREATING NEW CONDITION RECORDS FROM INPUT FILE.
Is there ay function module to update or create the condtion records,
if u have any example interface program to update conditions records please send me.
regards
ram.

This must be your compiler output.
Basically, it is telling you two things that are wrong - in syntax.
1. On line number 11 of the file RationalCollection1.java, the compiler expects a type identifier - that would be the object or return type such as int, String, boolean, etc.
The reason it is doing this is probably due to your not ending a previous statement - like the "expected ';'" error statement. Check your code, make sure that methods (brackets) are closed correctly and there are no open statements (i.e. missing the semi-colen at the end).
2. On line number 33 of the file RationalCollection1.java, the compiler expected the closing bracket. Thus, you didn't put the bracket where the compiler wants it.
It appears that you have skipped some lines of code. Those lines are the problem, post them - post lines 30-36 and 9-15 so we can see what is happening around those error lines.

Similar Messages

  • Create new condition record combination in MRM1

    I want to create a new combination of partner function/vendor  in condition record. Is it possible ?

    Hi Pradeep,
    There are some good number of threads available in abap-general forum on this.There is a good code given by ferry in this thread.http://Sample code for  BAPI_PRICES_CONDITIONS
    Regards,
    Madhu.

  • FM or BAPI for creating/deleting condition records for an output type

    Hi all,
               what is the FM or BAPI for creating and deleting the condition records for a Z(custom) output type.

    You can use trasaction SXDA_TOOLS.....
    object type BUS3003
    program type BINP
    program/method RM06IBI0
    but the fields must be sequentially written in the txt, with every space inclusive....

  • A programme that will extract particular records from a file

    Let's assume that there is a text file containing arround 50 records in the following format:
    ABCDEFGH:AB:12345:-09876:567:876
    The file to be read by the programme consist of a sequence of records each of which is split into fields using separator characters just like as we have in the Unix. The command line arguments should be given to execute the programme
    The most important part of the programme is that the condition for extracting a particular record from that file will be that specified fields shall contain a particular string of characters.
    The command line arguments to be given are:
    -tx This flag specifies the field separator character "x"
    -<num> This flag introduces a match requirement for field "num". Fields are numbered starting at 1. This flag may be followed by further flags and then by the string to look for.
    -f Fold case. I.e. string matching is not case sensitive.
    -t Transposition match. A match is recorded even if the strings differ provided the difference consists of just 2 characters transposed so that, for example: "compiler and complier" will be recorded as a match.
    -d A differ match. A match is recorded even if the two strings differ by one letter. For example: "gest and rest" will be recorded as a match.
    The file to be processed will be specified in the final command line argument.
    If match requirements are specified for more than one field the implication is that all fields specified must separately satisfy their individual match requirements. If any fields referred to in the match requirements are missing from a particular record then the record will not satisfy the overall match requirements.

    And your question is??

  • FM or BAPI to create new condition type / record for material - VK11

    Hi All,
        I need to copy condition records from one material to another material, to do that using the below FM. For the below values even its not raising any exception or creating pricing record. Could any one tell me am i missing any other parameters ?
    Please let me know.
    *& Report  Z_TEST292011
    REPORT  Z_TEST292011.
    data: ls_komg type KOMG,
          ls_komv type komv,
          lt_komv TYPE TABLE OF komv,
          lv_new_record.
    *ls_komg-kunnr = '0001000008'. " Cust number
    ls_komg-matnr = 'A0168L1600100006'. " Mat number
    ls_komg-VKORG = '3101'.
    ls_komg-vtweg = '10'.
    clear: Lt_komv,LS_KOMV.
    ls_komv-kappl = 'V '. " Application V = Sales
    ls_komv-kschl = 'ZR00'. " Condition type
    ls_komv-krech = 'B'. " calculation type; B -Fixed amount
    ls_komv-waers = 'USD'. " Currency
    ls_komv-kpein = '100'.
    ls_komv-kmein = 'EA'. " Unit of measurement
    ls_komv-kbetr = '121.50'. " new condition value
    append ls_komv to lt_komv.
    CALL FUNCTION 'RV_CONDITION_COPY'
      EXPORTING
        application                       = 'V'
        condition_table                   = '005'
        condition_type                    = 'ZR00'
    *    DATE_FROM                         = '20110629'
    *    DATE_TO                           = '99991231'
        ENQUEUE                           = 'X'
    *   I_KOMK                            = ' '
    *   I_KOMP                            = ' '
        key_fields                        = ls_komg
        MAINTAIN_MODE                     = 'A'
        NO_AUTHORITY_CHECK                = 'X'
        NO_FIELD_CHECK                    = 'X'
    *   SELECTION_DATE                    = '00000000'
        KEEP_OLD_RECORDS                  = 'X'
    *   MATERIAL_M                        =
    *   USED_BY_IDOC                      = ' '
    *   I_KONA                            =
        OVERLAP_CONFIRMED                 = 'X'
        NO_DB_UPDATE                      = ' '
    *   USED_BY_RETAIL                    = ' '
    IMPORTING
    *   E_KOMK                            =
    *   E_KOMP                            =
        NEW_RECORD                        = lv_new_record
    *   E_DATAB                           =
    *   E_DATBI                           =
    *   E_PRDAT                           =
      tables
        copy_records                      = lt_komv
    *   COPY_STAFFEL                      =
    *   COPY_RECS_IDOC                    =
    EXCEPTIONS
       ENQUEUE_ON_RECORD                 = 1
       INVALID_APPLICATION               = 2
       INVALID_CONDITION_NUMBER          = 3
       INVALID_CONDITION_TYPE            = 4
       NO_AUTHORITY_EKORG                = 5
       NO_AUTHORITY_KSCHL                = 6
       NO_AUTHORITY_VKORG                = 7
       NO_SELECTION                      = 8
       TABLE_NOT_VALID                   = 9
       NO_MATERIAL_FOR_SETTLEMENT        = 10
       NO_UNIT_FOR_PERIOD_COND           = 11
       NO_UNIT_REFERENCE_MAGNITUDE       = 12
       INVALID_CONDITION_TABLE           = 13
       OTHERS                            = 14
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    break jdonepud.
    call function 'RV_CONDITION_SAVE'.
    call function 'RV_CONDITION_RESET'.

    Hello ,
    why dont you try LSMW -RV14BTCI ?
    regards
    Prabhu

  • Create new condition for SO

    Dear Experts,
    Kindly assist me how to create conditiaon type for just 4 sales order type out off 10 sales order type.
    Exp:
    We have ZZ01 till ZZ10 - SO type
    ZZ01-ZZ04 - wanted to add aditional condition, that is admin fee during SO creation.
    Means I need to create new condition type for SO as ZAF1 & then tag this condition type with GL acc. 2000000000.
    - is that possible to view this condition only for those SO type & others are not allow to view during SO creation.
    - this condition ZAF1 (adnib fee) should tag with correct GL acc. the moment billing taking place.
    Kindly advice me what are configuration needed in order to create this settings. I never done this before for SD module. Thus please brief me well in order to place all these settings in SAP. Thank you.
    rgds,
    nantha

    Hi,
    You can also follow this
    Pricing procedure config:
    In SD, the steps to configure Pricing procedure are as under:
    Step 1:
    Condition table: If existing condition table meets the requirement, we need not create a new condition table. Considering the requirement for new condition table, the configuration will be done in SPRO as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Table (select the required fields combination, which will store condition record).
    Step 2:
    Access Sequence: If existing access sequence meets the requirement, we need not create a new access sequence. Considering the requirement for new sequence, the configuration will be done in SPRO as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Access Sequence (Access sequence is made up of Accesses (Tables) & the order of priority in which it is to be accessed. Here we assign the condition table to access sequence.
    Step 3:
    Condition Type: If existing condition type meets the requirement, we need not create a new condition type. Considering the requirement for new condition type, the configuration will be done in SPRO as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Type. It is always recommended to copy an existing similar condition type & make the necessary changes. Here we assign Access sequence to Condition type.
    Step 4:
    a. Pricing Procedure: It is recommended to copy a similar pricing procedure & make the necessary changes in new pricing procedure. Pricing Procedure is a set of condition type & arranged in the sequence in which it has to perform the calculation. Considering the requirement for new Pricing Procedure, the configuration will be done in SPRO as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Maintain Pricing Procedure.
    b. Pricing Procedure: After maintaining the pricing procedure the next step will be determination of pricing procedure. Configuration for determining pricing procedure in SPRO is as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Determine Pricing Procedure.
    Step 5: Condition record: Condition record is a master data, which is required to be maintained by Core team / person responsible from the client. During new implementation, the condition records can be uploaded using tools like SCAT, LSMW, etc.

  • How to update purchase order when creating a new condition records

    Hi,
      We have the system configured so that whenever we update a condition record, a change pointer is generated. Then we the use of standard reports RMEBEIN4 and RMEBEIN, all open purchase order having that condition type is updated. However this only works when we update existing condition record. When we create a new condition record, this does not work even though the change pointer is created. Do the reports mentionned above works for the this case or another standard report that should be trigger.
    Thank you for your help

    hi,
    May be this is working for the conditions already existing in the info record for the PO's.  so when you have new condition record it updates only after you amend the PO with that condition and save it.
    Kiran

  • What is procedure for creating new vendor and material master data in ABAP

    What is procedure for creating new vendor and material master data in ABAP .

    see below code which is used for creation of vendor master as well as extension...
    *& Report  ZFC_VENDOR_CREATE                                           *
    REPORT  ZFC_VENDOR_CREATE  LINE-SIZE 100
                               NO STANDARD PAGE HEADING
                               MESSAGE-ID ZZ.
                         TABLES
    TABLES : SSCRFIELDS.   " Fields on selection screens
                         CONSTANTS
    DATA : C_SPLIT TYPE C VALUE '#'.  " Used for Has Separator in GUI_UPLAOD
                         TYPES
    Int'table to hold Vendor Master Data
    TYPES : BEGIN OF TY_VENDOR_MASTER,
              FLAG  TYPE C,               " Update Flag
              LIFNR TYPE LIFNR,           " Vendor Number
              BUKRS TYPE BUKRS,           " Company Code
              KTOKK TYPE KTOKK,           " Account Group
              ANRED TYPE ANRED,           " Title
              NAME1 TYPE NAME1_GP,        " Name1
              NAME2 TYPE NAME2_GP,        " Name2
              SORTL TYPE SORTL,           " Search Term 1
              SORT2 TYPE AD_SORT2UL,      " Search Term 2
              STRAS TYPE STRAS_GP,        " Street
              PSTLZ TYPE PSTLZ,           " Postal Code
              ORT01 TYPE ORT01_GP,        " City
              REGIO TYPE REGIO,           " Region
              LAND1 TYPE LAND1_GP,        " Country
              SPRAS TYPE SPRAS,           " Language
              VBUND TYPE RASSC,           " Trading Partner
              BANKS TYPE BANKS,           " Country
              BANKL TYPE BANKK,           " Bank Key
              BANKN TYPE BANKN,           " Bank Account
              BKONT TYPE BKONT,           " Bank Control Key
              BANKA TYPE BANKA,           " Name of Bank
              AKONT TYPE AKONT,           " Reconciliation Account
              FDGRV TYPE FDGRV,           " Cash Management Group
              ZTERM TYPE DZTERM,          " Payment Terms
              REPRF TYPE REPRF,           " Check Double Invoice
              ZWELS TYPE DZWELS,          " Payment Methods
              XPORE TYPE XPORE,           " Pay all items separately
            END   OF TY_VENDOR_MASTER,
    Int'table to hold Vendor Extend Data
            BEGIN OF TY_VENDOR_EXTEND,
              FLAG  TYPE C,               " Update Flag
              LIFNR     TYPE LIFNR,           " Vendor Number
              BUKRS     TYPE BUKRS,           " Company Code
              KTOKK     TYPE KTOKK,           " Account Group
              REF_LIFNR TYPE LIFNR,           " Reference Vendor Number
              REF_BUKRS TYPE BUKRS,           " Reference Company Code
              AKONT     TYPE AKONT,           " Reconciliation Account
              FDGRV     TYPE FDGRV,           " Cash Management Group
              ZTERM     TYPE DZTERM,          " Payment Terms
              REPRF     TYPE REPRF,           " Check Double Invoice
              ZWELS     TYPE DZWELS,          " Payment Methods
              XPORE TYPE XPORE,           " Pay all items separately
            END   OF TY_VENDOR_EXTEND,
    Int'table to hold Error Records Data
            BEGIN OF TY_ERROR,
              MSG(200) TYPE C,                " To hold Message
              LIFNR    TYPE LIFNR,            " Vendor Number
              BUKRS    TYPE BUKRS,            " Company Code
            END   OF TY_ERROR.
                         DATA (Simple Fields)
    DATA : W_COUNT TYPE I,               " Variable to hold count of Records
           W_SUCC_REC TYPE I,            " No. of Success Records
           W_SUCC_REC1 TYPE I,           " No. of Updated Records
           W_ERR_REC TYPE I,             " No. of Error Records
           w_noupdate_rec type i.        " No. of Records not Changed
                         INTERNAL TABLES
    Int'table to hold uploaded data from File
    DATA : IT_VENDOR_MASTER    TYPE STANDARD TABLE OF TY_VENDOR_MASTER,
           WA_IT_VENDOR_MASTER TYPE TY_VENDOR_MASTER,
           IT_VENDOR_EXTEND    TYPE STANDARD TABLE OF TY_VENDOR_EXTEND,
           WA_IT_VENDOR_EXTEND TYPE TY_VENDOR_EXTEND,
           WA_IT_BDCDATA       TYPE BDCDATA,
           IT_BDCDATA          TYPE STANDARD TABLE OF BDCDATA,
           WA_IT_MESSTAB       TYPE BDCMSGCOLL,
           IT_MESSTAB          TYPE STANDARD TABLE OF BDCMSGCOLL,
           IT_ERROR            TYPE STANDARD TABLE OF TY_ERROR,
           WA_IT_ERROR         TYPE TY_ERROR,
           it_error_fk01       type standard table of ty_error,
           wa_it_error_fk01    type ty_error,
           it_error_fk02       type standard table of ty_error,
           wa_it_error_fk02    type ty_error,
           it_succ_rec1        type standard table of ty_error,
           wa_it_succ_rec1     type ty_error,
           it_noupdate         type standard table of ty_error,
           wa_it_noupdate      type ty_error.
                         FLAGS
    DATA : FL_FLAG1 TYPE C,          " Flag to check error upload file
           FL_FLAG2 TYPE C,          " Flag to hold value
           FL_FLAG3 TYPE C,          " Flag to hold value
           FL_FLAG4 TYPE C.          " Flag to hold value
                         SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-001,
                POSITION POS_LOW.
    PARAMETERS :       P_FILE(128) DEFAULT 'C:\UPLOAD.TXT' OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-002,
                POSITION POS_LOW.
    PARAMETERS :       P_VENMAS RADIOBUTTON GROUP R1 DEFAULT 'X'.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-003,
                POSITION POS_LOW.
    PARAMETERS :       P_VENEXT RADIOBUTTON GROUP R1.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-004,
                POSITION POS_LOW.
    PARAMETERS :       P_MODE(1) DEFAULT 'N'.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-005,
                POSITION POS_LOW.
    PARAMETERS :       P_GROUP(12) DEFAULT 'ZFC_VENDOR_C' OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-016,
                POSITION POS_LOW.
    PARAMETERS :       P_GROUP1(12) DEFAULT 'ZFC_VENDOR_U' OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
                         AT SELECTION-SCREEN ON
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    Form to get file path for upload of data
      PERFORM GET_FILE_PATH.
    AT SELECTION-SCREEN ON BLOCK B1.
    Form to Validate data specified on Selection Screen
      CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
      PERFORM VALIDATE_DATA.
                         START - OF - SELECTION
    START-OF-SELECTION.
      IF P_VENMAS = 'X'.
    Form to upload data from Presentation Server for Vendor Master
        PERFORM UPLOAD_DATA TABLES IT_VENDOR_MASTER.
        IF FL_FLAG1 NE 'X'.
          SORT IT_VENDOR_MASTER BY LIFNR BUKRS KTOKK.
          DELETE IT_VENDOR_MASTER WHERE LIFNR = ' '
                                  AND   BUKRS = ' '
                                  AND   KTOKK = ' '.
    Form to process data for Vendor Master
          PERFORM INSERT_VENDOR_MASTER_DATA.
        ENDIF.
      ELSEIF P_VENEXT = 'X'.
    Form to upload data from Presentation Server for Vendor Extend
        PERFORM UPLOAD_DATA TABLES IT_VENDOR_EXTEND.
        IF FL_FLAG1 NE 'X'.
          SORT IT_VENDOR_EXTEND BY LIFNR BUKRS KTOKK.
          DELETE IT_VENDOR_EXTEND WHERE LIFNR = ' '
                                  AND   BUKRS = ' '
                                  AND   KTOKK = ' '.
    Form to process data for Vendor Master
          PERFORM CHK_AND_INS_VENDOR_EXTEND_DATA.
        ENDIF.
      ENDIF.
                         END - OF - SELECTION
    END-OF-SELECTION.
      IF FL_FLAG1 NE 'X'.
        FORMAT COLOR 7.
        WRITE:/2 TEXT-O01.           " Total Number of records read :
        FORMAT COLOR OFF.
        WRITE:40 W_COUNT.
        FORMAT COLOR 7.
        WRITE:/2 TEXT-O02.           " Total Number of Success records :
        FORMAT COLOR OFF.
        WRITE:40 W_SUCC_REC.
        FORMAT COLOR 7.
        WRITE:/2 TEXT-O07.           " Total Number of Updated records :
        FORMAT COLOR OFF.
        WRITE:40 W_SUCC_REC1.
        FORMAT COLOR 7.
        WRITE:/2 TEXT-O08.           " Total Number of Unchanged records :
        FORMAT COLOR OFF.
        WRITE:40 W_noupdate_REC.
        FORMAT COLOR 7.
        WRITE:/2 TEXT-O03.           " Total Number of Error records :
        FORMAT COLOR OFF.
        WRITE:40 W_ERR_REC.
        if not it_succ_rec1 is initial.
          skip 1.
          perform display_changed_report.
        endif.
        if not it_noupdate is initial.
          skip 1.
          perform display_nochange_report.
        endif.
        IF NOT IT_ERROR IS INITIAL.
          SKIP 3.
    Form to display error data
          PERFORM DISPLAY_ERROR_REPORT.
        ENDIF.
        IF FL_FLAG2 = 'X'.
          SKIP 2.
          FORMAT COLOR 4.
          WRITE:/2 TEXT-O04.        " BDC Session Name for Creation (FK01) :
          FORMAT COLOR OFF.
          WRITE:40 P_GROUP.
          perform display_error_report_fk01.
        ENDIF.
        IF FL_FLAG3 = 'X'.
          SKIP 2.
          FORMAT COLOR 4.
          WRITE:/2 TEXT-O09.        " BDC Session Name for Updation (FK02) :
          FORMAT COLOR OFF.
          WRITE:40 P_GROUP1.
          perform display_error_report_fk02.
        ENDIF.
      ENDIF.
    *&      Form  GET_FILE_PATH
    This form is used to get the specified path for uploading of data from
    flat file with the help of F4 function key
    FORM GET_FILE_PATH .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = ' '
        IMPORTING
          FILE_NAME     = P_FILE.
    ENDFORM.                    " GET_FILE_PATH
    *&      Form  VALIDATE_DATA
    This form is used to validate the data given by user on the Selection
    Screen and the appropriate message is been displayed when an wrong
    entry is inputted
    FORM VALIDATE_DATA .
      IF SY-BATCH EQ 'X'.
        CLEAR SSCRFIELDS-UCOMM.
        MESSAGE E001(ZZ) WITH TEXT-011.
        " Excel file not to be used in Batch Mode
      ENDIF.
      IF P_MODE NE 'A' AND P_MODE NE 'N' AND P_MODE NE 'E'.
        MESSAGE E001(ZZ) WITH TEXT-012.
        " Session Mode should be either A or N or E
      ENDIF.
    ENDFORM.                    " VALIDATE_DATA
    *&      Form  UPLOAD_DATA
    This form is used to upload data from Presentation Server for either
    Vendor Master or Vendor Extend
    FORM UPLOAD_DATA TABLES P_IT_VENDOR.
      DATA : L_FILENAME TYPE STRING,
             L_FILETYPE TYPE CHAR10 VALUE 'ASC',
             L_HEADER_LENGTH TYPE I VALUE 0,
             L_READ_BY_LINE TYPE CHAR01 VALUE 'X'.
      MOVE P_FILE TO L_FILENAME.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = L_FILENAME
          FILETYPE                = L_FILETYPE
          HEADER_LENGTH           = L_HEADER_LENGTH
          READ_BY_LINE            = L_READ_BY_LINE
          HAS_FIELD_SEPARATOR     = C_SPLIT
        TABLES
          DATA_TAB                = P_IT_VENDOR
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      IF SY-SUBRC <> 0.
       MESSAGE I001(ZZ) WITH TEXT-006 L_FILENAME.
    MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        FL_FLAG1 = 'X'.
      ELSEIF P_IT_VENDOR[] IS INITIAL.
        MESSAGE I001(ZZ) WITH TEXT-014.   " Uploaded File contains no data
        FL_FLAG1 = 'X'.
      ENDIF.
    ENDFORM.                    " UPLOAD_DATA
    *&      Form  INSERT_VENDOR_MASTER_DATA
    This form is used to process BDC data for Vendor Master
    FORM INSERT_VENDOR_MASTER_DATA .
      DATA : L_LIFNR TYPE LIFNR.
      CLEAR : L_LIFNR.
      sort it_vendor_master by flag.
      LOOP AT IT_VENDOR_MASTER INTO WA_IT_VENDOR_MASTER.
        W_COUNT = W_COUNT + 1.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = WA_IT_VENDOR_MASTER-LIFNR
          IMPORTING
            OUTPUT = WA_IT_VENDOR_MASTER-LIFNR.
        if wa_it_vendor_master-flag = 'A'.
        SELECT SINGLE LIFNR
               FROM LFB1
               INTO L_LIFNR
               WHERE LIFNR = WA_IT_VENDOR_MASTER-LIFNR
               AND   BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
        IF SY-SUBRC EQ 0.
          WA_IT_ERROR-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
          WA_IT_ERROR-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
          WA_IT_ERROR-MSG   = TEXT-015.
          APPEND WA_IT_ERROR TO IT_ERROR.
          W_ERR_REC = W_ERR_REC + 1.
          CLEAR : WA_IT_ERROR, L_LIFNR.
        ELSE.
          REFRESH IT_BDCDATA.
          CLEAR IT_BDCDATA.
          PERFORM POPULATE_BDC_DATA_VEN_MASTER.
          PERFORM CALL_TRANSACTION.
        ENDIF.
        CLEAR : WA_IT_VENDOR_MASTER.
        elseif wa_it_vendor_master-flag = 'C'.
          IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
            PERFORM CLOSE_BDC_SESSION.
            fl_flag4 = 'X'.
          ENDIF.
          REFRESH IT_BDCDATA.
          CLEAR IT_BDCDATA.
          PERFORM POPULATE_BDC_DATA_VEN_MASTER.
          PERFORM CALL_TRANSACTION_FK02.
          CLEAR : WA_IT_VENDOR_MASTER.
        elseif wa_it_vendor_master-flag = 'N'.
          WA_IT_noupdate-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
          WA_IT_noupdate-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
          WA_IT_noupdate-MSG   = TEXT-018.
          APPEND WA_IT_noupdate TO IT_noupdate.
          W_noupdate_REC = W_noupdate_REC + 1.
          CLEAR : WA_IT_noupdate, WA_IT_VENDOR_MASTER.
        endif.
      ENDLOOP.
      IF FL_FLAG3 = 'X'.
        PERFORM CLOSE_BDC_SESSION.
      ENDIF.
    ENDFORM.                    " INSERT_VENDOR_MASTER_DATA
    *&      Form  POPULATE_BDC_DATA_VEN_MASTER
    This form is used to populate BDC data of Vendor Master
    FORM POPULATE_BDC_DATA_VEN_MASTER .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = WA_IT_VENDOR_MASTER-ZTERM
        IMPORTING
          OUTPUT = WA_IT_VENDOR_MASTER-ZTERM.
      IF WA_IT_VENDOR_MASTER-REPRF = 'Y'.
        WA_IT_VENDOR_MASTER-REPRF = 'X'.
      ENDIF.
      IF WA_IT_VENDOR_MASTER-XPORE = 'Y'.
        WA_IT_VENDOR_MASTER-XPORE = 'X'.
      ENDIF.
      if wa_it_vendor_master-flag = 'A'.
      PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
               BDC_FIELD  USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
               BDC_FIELD  USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
               BDC_FIELD  USING 'RF02K-KTOKK' WA_IT_VENDOR_MASTER-KTOKK,
               BDC_FIELD  USING 'BDC_OKCODE'  '/00'.
      elseif wa_it_vendor_master-flag = 'C'.
      PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
               BDC_FIELD  USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
               BDC_FIELD  USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
               BDC_FIELD  USING 'BDC_OKCODE'  '=MALL',
               BDC_DYNPRO USING 'SAPMF02K' '0106',
               BDC_FIELD  USING 'RF02K-D0110' 'X',
               BDC_FIELD  USING 'RF02K-D0120' 'X',
               BDC_FIELD  USING 'RF02K-D0130' 'X',
               BDC_FIELD  USING 'RF02K-D0210' 'X',
               BDC_FIELD  USING 'RF02K-D0215' 'X',
               BDC_FIELD  USING 'RF02K-D0220' 'X',
               BDC_FIELD  USING 'BDC_OKCODE'  '/00'.
      endif.
      perform :BDC_DYNPRO USING 'SAPMF02K' '0110',
               BDC_FIELD  USING 'LFA1-ANRED'  WA_IT_VENDOR_MASTER-ANRED,
               BDC_FIELD  USING 'LFA1-NAME1'  WA_IT_VENDOR_MASTER-NAME1,
               BDC_FIELD  USING 'LFA1-NAME2'  WA_IT_VENDOR_MASTER-NAME2,
               BDC_FIELD  USING 'LFA1-SORTL'  WA_IT_VENDOR_MASTER-SORTL,
               BDC_FIELD  USING 'LFA1-STRAS'  WA_IT_VENDOR_MASTER-STRAS,
               BDC_FIELD  USING 'LFA1-ORT01'  WA_IT_VENDOR_MASTER-ORT01,
               BDC_FIELD  USING 'LFA1-PSTLZ'  WA_IT_VENDOR_MASTER-PSTLZ,
               BDC_FIELD  USING 'LFA1-LAND1'  WA_IT_VENDOR_MASTER-LAND1,
               BDC_FIELD  USING 'LFA1-REGIO'  WA_IT_VENDOR_MASTER-REGIO,
               BDC_FIELD  USING 'LFA1-SPRAS'  WA_IT_VENDOR_MASTER-SPRAS,
               BDC_FIELD  USING 'BDC_OKCODE'  '/00',
               BDC_DYNPRO USING 'SAPMF02K' '0120',
               BDC_FIELD  USING 'LFA1-VBUND'  WA_IT_VENDOR_MASTER-VBUND,
               BDC_FIELD  USING 'BDC_OKCODE'  '/00',
               BDC_DYNPRO USING 'SAPMF02K' '0130',
               BDC_FIELD  USING 'LFBK-BANKS(01)'  WA_IT_VENDOR_MASTER-BANKS,
               BDC_FIELD  USING 'LFBK-BANKL(01)'  WA_IT_VENDOR_MASTER-BANKL,
               BDC_FIELD  USING 'LFBK-BANKN(01)'  WA_IT_VENDOR_MASTER-BANKN,
               BDC_FIELD  USING 'BDC_OKCODE'  '=BANK',
               BDC_DYNPRO USING 'SAPLBANK' '0100',
               BDC_FIELD  USING 'BNKA-BANKA'  WA_IT_VENDOR_MASTER-BANKA,
               BDC_FIELD  USING 'BDC_OKCODE'  '=ENTR',
               BDC_DYNPRO USING 'SAPMF02K' '0130',
               BDC_FIELD  USING 'BDC_OKCODE'  '=ENTR',
               BDC_DYNPRO USING 'SAPMF02K' '0210',
               BDC_FIELD  USING 'LFB1-AKONT'  WA_IT_VENDOR_MASTER-AKONT,
               BDC_FIELD  USING 'LFB1-FDGRV'  WA_IT_VENDOR_MASTER-FDGRV,
               BDC_FIELD  USING 'BDC_OKCODE'  '=/00',
               BDC_DYNPRO USING 'SAPMF02K' '0215',
               BDC_FIELD  USING 'LFB1-ZTERM'  WA_IT_VENDOR_MASTER-ZTERM,
               BDC_FIELD  USING 'LFB1-REPRF'  WA_IT_VENDOR_MASTER-REPRF,
               BDC_FIELD  USING 'LFB1-ZWELS'  WA_IT_VENDOR_MASTER-ZWELS,
               BDC_FIELD  USING 'LFB1-XPORE'  WA_IT_VENDOR_MASTER-XPORE,
               BDC_FIELD  USING 'BDC_OKCODE'  '=UPDA'.
    ENDFORM.                    " POPULATE_BDC_DATA_VEN_MASTER
    *&      Form  BDC_DYNPRO
    This form is used to move data to BDCDATA int'table
    FORM BDC_DYNPRO  USING PROGRAM TYPE BDC_PROG
                           DYNPRO  TYPE BDC_DYNR.
      CLEAR WA_IT_BDCDATA.
      WA_IT_BDCDATA-PROGRAM  = PROGRAM.
      WA_IT_BDCDATA-DYNPRO   = DYNPRO.
      WA_IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_IT_BDCDATA TO IT_BDCDATA.
    ENDFORM.                    " BDC_DYNPRO
    *&      Form  BDC_FIELD
    This form is used to move data to BDCDATA int'table
    FORM BDC_FIELD  USING FNAM TYPE ANY
                          FVAL TYPE ANY.
      CLEAR WA_IT_BDCDATA.
      WA_IT_BDCDATA-FNAM = FNAM.
      WA_IT_BDCDATA-FVAL = FVAL.
      APPEND WA_IT_BDCDATA TO IT_BDCDATA.
    ENDFORM.                    " BDC_FIELD
    *&      Form  CALL_TRANSACTION
    This form is used to Call FK01 for processing of data either for
    Vendor Master or Vendor Extend. The error records are inserted to
    Session which can be processed using SM35
    FORM CALL_TRANSACTION .
      DATA : L_OPTION TYPE CTU_PARAMS,
             L_SUBRC TYPE SYSUBRC.
      REFRESH IT_MESSTAB.
      CLEAR IT_MESSTAB.
      L_OPTION-DEFSIZE = 'X'.
      L_OPTION-DISMODE = P_MODE.
      L_OPTION-UPDMODE = 'S'.
      CALL TRANSACTION 'FK01'
           USING IT_BDCDATA
           MESSAGES INTO IT_MESSTAB
           OPTIONS FROM L_OPTION.
      L_SUBRC = SY-SUBRC.
      IF L_SUBRC = 0.
        W_SUCC_REC = W_SUCC_REC + 1.
      ELSE.
        IF FL_FLAG2 NE 'X'.
          PERFORM OPEN_BDC_SESSION.
          FL_FLAG2 = 'X'.
        ENDIF.
        PERFORM BDC_INSERT.
        W_ERR_REC = W_ERR_REC + 1.
        PERFORM ERROR_RECORD_DATA.
      ENDIF.
    ENDFORM.                    " CALL_TRANSACTION
    *&      Form  OPEN_BDC_SESSION
    Form used to open session for Error out Records
    FORM OPEN_BDC_SESSION .
      DATA : L_USERID TYPE APQ_MAPN,      " Variable to hold user-id
             L_GROUP TYPE APQ_GRPN.       " Variable to hold value
      MOVE P_GROUP TO L_GROUP.
      MOVE SY-UNAME TO L_USERID.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          CLIENT              = SY-MANDT
          GROUP               = L_GROUP
          KEEP                = SPACE
          USER                = L_USERID
        EXCEPTIONS
          CLIENT_INVALID      = 1
          DESTINATION_INVALID = 2
          GROUP_INVALID       = 3
          GROUP_IS_LOCKED     = 4
          HOLDDATE_INVALID    = 5
          INTERNAL_ERROR      = 6
          QUEUE_ERROR         = 7
          RUNNING             = 8
          SYSTEM_LOCK_ERROR   = 9
          USER_INVALID        = 10
          OTHERS              = 11.
      IF SY-SUBRC <> 0.
        WRITE:/ TEXT-008.              " Unable to open BDC Session
      ENDIF.
    ENDFORM.                    " OPEN_BDC_SESSION
    *&      Form  BDC_INSERT
    This form is used to insert error records to a Session method
    FORM BDC_INSERT .
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE            = 'FK01'
        TABLES
          DYNPROTAB        = IT_BDCDATA
        EXCEPTIONS
          INTERNAL_ERROR   = 1
          NOT_OPEN         = 2
          QUEUE_ERROR      = 3
          TCODE_INVALID    = 4
          PRINTING_INVALID = 5
          POSTING_INVALID  = 6
          OTHERS           = 7.
      IF SY-SUBRC <> 0.
        WRITE:/ TEXT-009.             " Unable to Insert Data to BDC Session
      ENDIF.
    ENDFORM.                    " BDC_INSERT
    *&      Form  ERROR_RECORD_DATA
    This form is used to process the messages for the error records which
    will be displayed on the output report
    FORM ERROR_RECORD_DATA .
      DATA : L_LINES TYPE I,
             L_MSG(200) TYPE C.
      DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
      READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
      IF SY-SUBRC = 0.
        CLEAR L_MSG.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID        = WA_IT_MESSTAB-MSGID
            LANG      = SY-LANGU
            NO        = WA_IT_MESSTAB-MSGNR
            V1        = WA_IT_MESSTAB-MSGV1
            V2        = WA_IT_MESSTAB-MSGV2
            V3        = WA_IT_MESSTAB-MSGV3
            V4        = WA_IT_MESSTAB-MSGV4
          IMPORTING
            MSG       = L_MSG
          EXCEPTIONS
            NOT_FOUND = 1
            OTHERS    = 2.
        IF SY-SUBRC = 0.
          WA_IT_ERROR_fk01-MSG = L_MSG.
        ENDIF.
        IF P_VENMAS = 'X'.
          WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
          WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
        ELSEIF P_VENEXT = 'X'.
          WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
          WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
        ENDIF.
        APPEND WA_IT_ERROR_fk01 TO IT_ERROR_fk01.
        CLEAR WA_IT_ERROR_fk01.
      ENDIF.
    ENDFORM.                    " ERROR_RECORD_DATA
    *&      Form  CLOSE_BDC_SESSION
    Form used to close session of the Error Records
    FORM CLOSE_BDC_SESSION .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          NOT_OPEN    = 1
          QUEUE_ERROR = 2
          OTHERS      = 3.
      IF SY-SUBRC <> 0.
        WRITE:/ TEXT-010.             " Unable to Close BDC Session
      ENDIF.
    ENDFORM.                    " CLOSE_BDC_SESSION
    *&      Form  CHK_AND_INS_VENDOR_EXTEND_DATA
    This form is used to process BDC data for Vendor Extend
    FORM CHK_AND_INS_VENDOR_EXTEND_DATA .
      DATA : L_LIFNR TYPE LIFNR.
      CLEAR : L_LIFNR, fl_flag4.
      sort it_vendor_extend by flag.
      LOOP AT IT_VENDOR_EXTEND INTO WA_IT_VENDOR_EXTEND.
        W_COUNT = W_COUNT + 1.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = WA_IT_VENDOR_EXTEND-REF_LIFNR
          IMPORTING
            OUTPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR.
        if wa_it_vendor_extend-flag = 'A'.
        SELECT SINGLE LIFNR
               FROM LFB1
               INTO L_LIFNR
               WHERE LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR
               AND   BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
        IF SY-SUBRC NE 0.
          WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR.
          WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
          WA_IT_ERROR-MSG   = TEXT-007.
          APPEND WA_IT_ERROR TO IT_ERROR.
          W_ERR_REC = W_ERR_REC + 1.
          CLEAR : WA_IT_ERROR, L_LIFNR.
        ELSE.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              INPUT  = WA_IT_VENDOR_EXTEND-LIFNR
            IMPORTING
              OUTPUT = WA_IT_VENDOR_EXTEND-LIFNR.
          SELECT SINGLE LIFNR
                 FROM LFB1
                 INTO L_LIFNR
                 WHERE LIFNR = WA_IT_VENDOR_EXTEND-LIFNR
                 AND   BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
          IF SY-SUBRC EQ 0.
            WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
            WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
            WA_IT_ERROR-MSG   = TEXT-015.
            APPEND WA_IT_ERROR TO IT_ERROR.
            W_ERR_REC = W_ERR_REC + 1.
            CLEAR : WA_IT_ERROR, L_LIFNR.
          ELSE.
            REFRESH IT_BDCDATA.
            CLEAR IT_BDCDATA.
            PERFORM POPULATE_BDC_DATA_VEN_EXTEND.
            PERFORM CALL_TRANSACTION.
          ENDIF.
        ENDIF.
        CLEAR : WA_IT_VENDOR_EXTEND.
        elseif wa_it_vendor_extend-flag = 'C'.
          IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
            PERFORM CLOSE_BDC_SESSION.
            fl_flag4 = 'X'.
          ENDIF.
          REFRESH IT_BDCDATA.
          CLEAR IT_BDCDATA.
          PERFORM POPULATE_BDC_DATA_VEN_extend.
          PERFORM CALL_TRANSACTION_FK02.
           CLEAR : WA_IT_VENDOR_EXTEND.
        elseif wa_it_vendor_extend-flag = 'N'.
          WA_IT_noupdate-LIFNR = WA_IT_VENDOR_extend-LIFNR.
          WA_IT_noupdate-BUKRS = WA_IT_VENDOR_extend-BUKRS.
          WA_IT_noupdate-MSG   = TEXT-019.
          APPEND WA_IT_noupdate TO IT_noupdate.
          W_noupdate_REC = W_noupdate_REC + 1.
          CLEAR : WA_IT_noupdate, WA_IT_VENDOR_EXTEND.
        endif.
      ENDLOOP.
      IF FL_FLAG2 = 'X'.
        PERFORM CLOSE_BDC_SESSION.
      ENDIF.
      if fl_flag3 = 'X'.
        PERFORM CLOSE_BDC_SESSION.
      ENDIF.
    ENDFORM.                    " CHK_AND_INS_VENDOR_EXTEND_DATA
    *&      Form  POPULATE_BDC_DATA_VEN_EXTEND
    This form is used to populate BDC data of Vendor Extend
    FORM POPULATE_BDC_DATA_VEN_EXTEND .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = WA_IT_VENDOR_EXTEND-ZTERM
        IMPORTING
          OUTPUT = WA_IT_VENDOR_EXTEND-ZTERM.
      IF WA_IT_VENDOR_EXTEND-REPRF = 'Y'.
        WA_IT_VENDOR_EXTEND-REPRF = 'X'.
      ENDIF.
      IF WA_IT_VENDOR_extend-XPORE = 'Y'.
        WA_IT_VENDOR_extend-XPORE = 'X'.
      ENDIF.
      if wa_it_vendor_extend-flag = 'A'.
      PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
               BDC_FIELD  USING 'RF02K-LIFNR' WA_IT_VENDOR_EXTEND-LIFNR,
               BDC_FIELD  USING 'RF02K-BUKRS' WA_IT_VENDOR_EXTEND-BUKRS,
               BDC_FIELD  USING 'RF02K-KTOKK' WA_IT_VENDOR_EXTEND-KTOKK,
               BDC_FIELD  USING 'RF02K-REF_LIFNR'
                                          WA_IT_VENDOR_EXTEND-REF_LIFNR,
               BDC_FIELD  USING 'RF02K-REF_BUKRS'
                                          WA_IT_VENDOR_EXTEND-REF_BUKRS,
               BDC_FIELD  USING 'BDC_OKCODE'  '/00'.
      elseif wa_it_vendor_extend-flag = 'C'.
      PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
               BDC_FIELD  USING 'RF02K-LIFNR' WA_IT_VENDOR_extend-LIFNR,
               BDC_FIELD  USING 'RF02K-BUKRS' WA_IT_VENDOR_extend-BUKRS,
               BDC_FIELD  USING 'RF02K-D0210' 'X',
               BDC_FIELD  USING 'RF02K-D0215' 'X',
               BDC_FIELD  USING 'BDC_OKCODE'  '/00'.
      endif.
      perform :BDC_DYNPRO USING 'SAPMF02K' '0210',
               BDC_FIELD  USING 'LFB1-AKONT'  WA_IT_VENDOR_EXTEND-AKONT,
               BDC_FIELD  USING 'LFB1-FDGRV'  WA_IT_VENDOR_EXTEND-FDGRV,
               BDC_FIELD  USING 'BDC_OKCODE'  '=/00',
               BDC_DYNPRO USING 'SAPMF02K' '0215',
               BDC_FIELD  USING 'LFB1-ZTERM'  WA_IT_VENDOR_EXTEND-ZTERM,
               BDC_FIELD  USING 'LFB1-REPRF'  WA_IT_VENDOR_EXTEND-REPRF,
               BDC_FIELD  USING 'LFB1-ZWELS'  WA_IT_VENDOR_EXTEND-ZWELS,
               BDC_FIELD  USING 'LFB1-XPORE'  WA_IT_VENDOR_extend-XPORE,
               BDC_FIELD  USING 'BDC_OKCODE'  '=UPDA'.
    ENDFORM.                    " POPULATE_BDC_DATA_VEN_EXTEND
    *&      Form  DISPLAY_ERROR_REPORT
    This form is used to display the error records on the output screen
    FORM DISPLAY_ERROR_REPORT .
      IF P_VENMAS = 'X'.
        WRITE:/ TEXT-O05.            " Error List for Vendor Master
      ELSEIF P_VENEXT = 'X'.
        WRITE:/ TEXT-O06.            " Error List for Vendor Master Extended
      ENDIF.
      WRITE:/ SY-ULINE(100).
      FORMAT COLOR 1.
      WRITE:/1   SY-VLINE,
             2   TEXT-H01,              " Vendor Number
             17  SY-VLINE,
             18  TEXT-H02,              " Company Code
             31  SY-VLINE,
             32  TEXT-H03,              " Error Message
             100 SY-VLINE.
      FORMAT COLOR OFF.
      WRITE:/ SY-ULINE(100).
      LOOP AT IT_ERROR INTO WA_IT_ERROR.
        FORMAT COLOR 2.
        WRITE:/1   SY-VLINE,
               2   WA_IT_ERROR-LIFNR,
               17  SY-VLINE,
               18  WA_IT_ERROR-BUKRS,
               31  SY-VLINE,
               32  WA_IT_ERROR-MSG,
               100 SY-VLINE.
        CLEAR : WA_IT_ERROR.
        FORMAT COLOR OFF.
      ENDLOOP.
      WRITE:/ SY-ULINE(100).
    ENDFORM.                    " DISPLAY_ERROR_REPORT
    *&      Form  CALL_TRANSACTION_FK02
    Form used to Call Transaction FK02
    form CALL_TRANSACTION_FK02 .
      DATA : L_OPTION TYPE CTU_PARAMS,
             L_SUBRC TYPE SYSUBRC.
      REFRESH IT_MESSTAB.
      CLEAR IT_MESSTAB.
      L_OPTION-DEFSIZE = 'X'.
      L_OPTION-DISMODE = P_MODE.
      L_OPTION-UPDMODE = 'S'.
      CALL TRANSACTION 'FK02'
           USING IT_BDCDATA
           MESSAGES INTO IT_MESSTAB
           OPTIONS FROM L_OPTION.
      L_SUBRC = SY-SUBRC.
      IF L_SUBRC = 0.
        W_SUCC_REC1 = W_SUCC_REC1 + 1.
        WA_IT_succ_rec1-MSG = Text-017.
        IF P_VENMAS = 'X'.
          WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
          WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
        ELSEIF P_VENEXT = 'X'.
          WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
          WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
        ENDIF.
        APPEND WA_IT_succ_rec1 TO IT_succ_rec1.
      ELSE.
        IF FL_FLAG3 NE 'X'.
          PERFORM OPEN_BDC_SESSION_fk02.
          FL_FLAG3 = 'X'.
        ENDIF.
        PERFORM BDC_INSERT_fk02.
        W_ERR_REC = W_ERR_REC + 1.
        PERFORM ERROR_RECORD_DATA1.
      ENDIF.
    endform.                    " CALL_TRANSACTION_FK02
    *&      Form  OPEN_BDC_SESSION_fk02
    Form used to Open session for FK02
    form OPEN_BDC_SESSION_fk02 .
      DATA : L_USERID TYPE APQ_MAPN,      " Variable to hold user-id
             L_GROUP TYPE APQ_GRPN.       " Variable to hold value
      MOVE P_GROUP1 TO L_GROUP.
      MOVE SY-UNAME TO L_USERID.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          CLIENT              = SY-MANDT
          GROUP               = L_GROUP
          KEEP                = SPACE
          USER                = L_USERID
        EXCEPTIONS
          CLIENT_INVALID      = 1
          DESTINATION_INVALID = 2
          GROUP_INVALID       = 3
          GROUP_IS_LOCKED     = 4
          HOLDDATE_INVALID    = 5
          INTERNAL_ERROR      = 6
          QUEUE_ERROR         = 7
          RUNNING             = 8
          SYSTEM_LOCK_ERROR   = 9
          USER_INVALID        = 10
          OTHERS              = 11.
      IF SY-SUBRC <> 0.
        WRITE:/ TEXT-008.              " Unable to open BDC Session
      ENDIF.
    endform.                    " OPEN_BDC_SESSION_fk02
    *&      Form  BDC_INSERT_fk02
    Form used to insert data into BDC session using FK02
    form BDC_INSERT_fk02 .
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE            = 'FK02'
        TABLES
          DYNPROTAB        = IT_BDCDATA
        EXCEPTIONS
          INTERNAL_ERROR   = 1
          NOT_OPEN         = 2
          QUEUE_ERROR      = 3
          TCODE_INVALID    = 4
          PRINTING_INVALID = 5
          POSTING_INVALID  = 6
          OTHERS           = 7.
      IF SY-SUBRC <> 0.
        WRITE:/ TEXT-009.             " Unable to Insert Data to BDC Session
      ENDIF.
    endform.                    " BDC_INSERT_fk02
    *&      Form  display_changed_report
    Form to display Updated Vendor data
    form display_changed_report .
      IF P_VENMAS = 'X'.
        WRITE:/ TEXT-O10.          " Updated List for Vendor Master
      ELSEIF P_VENEXT = 'X'.
        WRITE:/ TEXT-O11.          " Updated List for Vendor Master Extended
      ENDIF.
      WRITE:/ SY-ULINE(100).
      FORMAT COLOR 1.
      WRITE:/1   SY-VLINE,
             2   TEXT-H01,              " Vendor Number
             17  SY-VLINE,
             18  TEXT-H02,              " Company Code
             31  SY-VLINE,
             32  TEXT-H04,              " Message
             100 SY-VLINE.
      FORMAT COLOR OFF.
      WRITE:/ SY-ULINE(100).
      LOOP AT IT_succ_rec1 INTO WA_IT_succ_rec1.
        FORMAT COLOR 2.
        WRITE:/1   SY-VLINE,
               2   WA_IT_succ_rec1-LIFNR,
               17  SY-VLINE,
               18  WA_IT_succ_rec1-BUKRS,
               31  SY-VLINE,
               32  WA_IT_succ_rec1-MSG,
               100 SY-VLINE.
        CLEAR : WA_IT_succ_rec1.
        FORMAT COLOR OFF.
      ENDLOOP.
      WRITE:/ SY-ULINE(100).
    endform.                    " display_changed_report
    *&      Form  display_nochange_report
    Form to display No Changed data for Vendors
    form display_nochange_report .
      IF P_VENMAS = 'X'.
        WRITE:/ TEXT-O12.       " No Changes List for Vendor Master
      ELSEIF P_VENEXT = 'X'.
        WRITE:/ TEXT-O13.       " No Changes List for Vendor Master Extended
      ENDIF.
      WRITE:/ SY-ULINE(100).
      FORMAT COLOR 1.
      WRITE:/1   SY-VLINE,
             2   TEXT-H01,              " Vendor Number
             17  SY-VLINE,
             18  TEXT-H02,              " Company Code
             31  SY-VLINE,
             32  TEXT-H04,              " Message
             100 SY-VLINE.
      FORMAT COLOR OFF.
      WRITE:/ SY-ULINE(100).
      LOOP AT IT_noupdate INTO WA_IT_noupdate.
        FORMAT COLOR 2.
        WRITE:/1   SY-VLINE,
               2   WA_IT_noupdate-LIFNR,
               17  SY-VLINE,
               18  WA_IT_noupdate-BUKRS,
               31  SY-VLINE,
               32  WA_IT_noupdate-MSG,
               100 SY-VLINE.
        CLEAR : WA_IT_noupdate.
        FORMAT COLOR OFF.
      ENDLOOP.
      WRITE:/ SY-ULINE(100).
    endform.                    " display_nochange_report
    *&      Form  ERROR_RECORD_DATA1
    Form to get Error Message for Changed Vendors
    form ERROR_RECORD_DATA1 .
      DATA : L_LINES TYPE I,
             L_MSG(200) TYPE C.
      DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
      READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
      IF SY-SUBRC = 0.
        CLEAR L_MSG.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID        = WA_IT_MESSTAB-MSGID
            LANG      = SY-LANGU
            NO        = WA_IT_MESSTAB-MSGNR
            V1        = WA_IT_MESSTAB-MSGV1
            V2        = WA_IT_MESSTAB-MSGV2
            V3        = WA_IT_MESSTAB-MSGV3
            V4        = WA_IT_MESSTAB-MSGV4
          IMPORTING
            MSG       = L_MSG
          EXCEPTIONS
            NOT_FOUND = 1
            OTHERS    = 2.
        IF SY-SUBRC = 0.
          WA_IT_ERROR_fk02-MSG = L_MSG.
        ENDIF.
        IF P_VENMAS = 'X'.
          WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
          WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
        ELSEIF P_VENEXT = 'X'.
          WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
          WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
        ENDIF.
        APPEND WA_IT_ERROR_fk02 TO IT_ERROR_fk02.
        CLEAR WA_IT_ERROR_fk02.
      ENDIF.
    endform.                    " ERROR_RECORD_DATA1
    *&      Form  display_error_report_fk01
    Form to display Error Report for Master Vendors (FK01)
    form display_error_report_fk01 .
      IF P_VENMAS = 'X'.
        WRITE:/ TEXT-O05.     " Error List for Vendor Master (FK01)
      ELSEIF P_VENEXT = 'X'.
        WRITE:/ TEXT-O06.     " Error List for Vendor Master Extended (FK01)
      ENDIF.
      WRITE:/ SY-ULINE(100).
      FORMAT COLOR 1.
      WRITE:/1   SY-VLINE,
             2   TEXT-H01,              " Vendor Number
             17  SY-VLINE,
             18  TEXT-H02,              " Company Code
             31  SY-VLINE,
             32  TEXT-H04,              " Message
             100 SY-VLINE.
      FORMAT COLOR OFF.
      WRITE:/ SY-ULINE(100).
      LOOP AT IT_ERROR_fk01 INTO WA_IT_ERROR_fk01.
        FORMAT COLOR 2.
        WRITE:/1   SY-VLINE,
               2   WA_IT_ERROR_fk01-LIFNR,
               17  SY-VLINE,
               18  WA_IT_ERROR_fk01-BUKRS,
               31  SY-VLINE,
               32  WA_IT_ERROR_fk01-MSG,
               100 SY-VLINE.
        CLEAR : WA_IT_ERROR_fk01.
        FORMAT COLOR OFF.
      ENDLOOP.
      WRITE:/ SY-ULINE(100).
    endform.                    " display_error_report_fk01
    *&      Form  display_error_report_fk02
    Form to display Error Report for changed Vendors (FK02)
    form display_error_report_fk02 .
      IF P_VENMAS = 'X'.
        WRITE:/ TEXT-O14.     " Error List for Vendor Master (FK02)
      ELSEIF P_VENEXT = 'X'.
        WRITE:/ TEXT-O15.     " Error List for Vendor Master Extended (FK02)
      ENDIF.
      WRITE:/ SY-ULINE(100).
      FORMAT COLOR 1.
      WRITE:/1   SY-VLINE,
             2   TEXT-H01,              " Vendor Number

  • Bapi to create a condition record

    hi,
    is there any standard bapi for creating ,changing and deleting a pricing record using VK11,VK12.
    any other function module will solve the problem.

    Hi Ajith,
       You can use <b>IDOC approach</b> also for doing teh same solution. Yo get Create/Change/ Delete Option as per indicator passed:
    Refer Code below.
    *&      Form  map_idoc_structure
          Map E1KOMG, E1KONH, E1KONP segment fields
    FORM map_idoc_structure
                  USING fp_condition_table TYPE kotabnr
                        fp_rate            TYPE z_cs_cpp_rate
                        fp_condition_type  TYPE kschl
                        fp_rate_type       TYPE z_cs_file_type.
    *-- Local Data Declaration
      DATA: lw_e1komg TYPE e1komg, "Filter seg. with separated condition key
            lw_e1konh TYPE e1konh, "Data from condition header
            lw_e1konp TYPE e1konp, "Conditions Items
            lv_delete TYPE konp-loevm_ko. " Delete Indicator
    *-- IDoc data internal table
      DATA: i_idoc_data TYPE TABLE OF edidd
                        INITIAL SIZE 0
                        WITH HEADER LINE.
      CLEAR: lw_e1komg,
             lw_e1konh,
             lw_e1konp,
             lv_delete,
             v_segnum,
             w_e1komg,
             v_rate_type.
      REFRESH i_idoc_data.
      v_rate_type = fp_rate_type.
      PERFORM conversion_alpha_input
          USING w_crp_data-kunnr CHANGING w_crp_data-kunnr.
      PERFORM conversion_matn1_input
         USING w_crp_data-matnr CHANGING w_crp_data-matnr.
    E1KOMG: Filter segment with separated condition key
      i_idoc_data-segnam  = 'E1KOMG'.
      lw_e1komg-kvewe     =  c_usage_cond_tab.
      lw_e1komg-kotabnr   =  fp_condition_table.
      lw_e1komg-kappl     =  c_cond_type.
      lw_e1komg-kschl     =  fp_condition_type.
    CONCATENATE p_vkorg p_vtweg p_spart p_hienr p_matnr
      CONCATENATE w_crp_data-vkorg w_crp_data-vtweg
                  w_crp_data-kunnr w_crp_data-matnr
                  INTO lw_e1komg-vakey.
      lw_e1komg-vakey_long = lw_e1komg-vakey.
      lw_e1komg-vkorg      = w_crp_data-vkorg.
      lw_e1komg-vtweg      = w_crp_data-vtweg.
      lw_e1komg-spart      = w_crp_data-spart.
      lw_e1komg-kunnr      = w_crp_data-kunnr.
      lw_e1komg-matnr      = w_crp_data-matnr.
      i_idoc_data-sdata = lw_e1komg.
      APPEND i_idoc_data TO i_idoc_data.
    Segment E1KONH - condition header
      i_idoc_data-segnam  = 'E1KONH'.
      lw_e1konh-datab     = w_crp_data-datab.
      lw_e1konh-datbi     = w_crp_data-datbi.
      lw_e1konh-knuma_pi  = v_promotion.
      lw_e1konh-knuma_ag  = v_sales_deal.
      i_idoc_data-sdata = lw_e1konh.
      APPEND i_idoc_data TO i_idoc_data.
      IF fm_process_type EQ c_pt_dep.
        lv_delete = c_x.              " Deletion Indicator
      ENDIF.
    Segment E1KONP - condition items
      i_idoc_data-segnam = 'E1KONP'.
      lw_e1konp-kschl     = fp_condition_type.
      lw_e1konp-kbetr     = fp_rate.
      lw_e1konp-konwa     = w_crp_data-waers.
      lw_e1konp-kpein     = v_cond_pric.
      lw_e1konp-kmein     = v_cond_unit.
      lw_e1konp-knuma_pi  = v_promotion.
      lw_e1konp-knuma_ag  = v_sales_deal.
      lw_e1konp-loevm_ko  = lv_delete.
      i_idoc_data-sdata = lw_e1konp.
      APPEND i_idoc_data TO i_idoc_data.
    *-- Post Idoc for Creating Pricing Condition
      PERFORM post_idoc
             TABLES i_idoc_data.
    ENDFORM.                    " map_idoc_structure
    *&      Form  post_idoc TABLES i_idoc_data.
          Post Idoc for Creating Pricing Condition
    FORM post_idoc
              TABLES i_idoc_data STRUCTURE edidd.
    *-- Local data declaration
      DATA: lv_komg         LIKE komg,         " Condition Structures
            lv_subrc        LIKE sy-subrc,     " Sy-subrc
            lw_messages     TYPE rsuvm_msg,    " Message Description
            lw_idoc_status  TYPE bdidocstat.   " ALE IDoc status
      DATA: idoc_contrl                        " IDoc Control data
                LIKE edidc OCCURS 1 WITH HEADER LINE.
    *-- Initialize Internal Tables
      CLEAR:  t_konh,
              t_konp,
              t_konm,
              t_konw,
              i_idoc_status,
              t_kona.
      REFRESH: t_konh,
               t_konp,
               t_konm,
               t_konw,
               i_idoc_status,
               t_kona,
               i_messages.
    This code is taken from IDOC_INPUT_COND_A
      PERFORM fill_appl_structures(saplvkoi)
                      TABLES i_idoc_data
                             t_konh
                             t_konp
                             t_konm
                             t_konw
                             i_idoc_status
                             t_kona
                       USING lv_komg
                             lv_subrc
                             idoc_contrl-docnum
                             idoc_contrl-mestyp.
      IF lv_subrc = 0.
    This code is taken from IDOC_INPUT_COND_A
        PERFORM idoc_in_datenbank(saplvkoi)
                  TABLES idoc_contrl
                         t_konh
                         t_konp
                         t_konm
                         t_konw
                         i_idoc_status
                         t_kona
                  USING  lv_komg
                         lv_subrc
                         idoc_contrl-docnum.
        IF lv_subrc = 0.
          COMMIT WORK AND WAIT.
        Endif.
    Reward points if this Helps.
    Manish
    Message was edited by: Manish Kumar

  • ERROR Message while creating Rebate condition record T code VBO1

    Dear Experts,
    I am getting error message while creating rebate condition record T code-VBO1-Error Msg-862 system cannot read the structure for table,because of this i could not create condition record.
    Please give the solution to create condition record.
    Regards
    siva

    Hi,
    You said you are trying to do this stuff in IDES right.
    If you are using IDES provided by a company and where many people play on IDES, then you can get many such issues...
    This is by our experience.  Today you do something in IDES and tommorow that thing or config is screwed up by others.
    If you have your own IDES, then check the suggestion given by the forum Guru's.
    Regards,
    SB

  • Hi, i am not able to get a Free icloud ID. Error is my device is not eligible for creating new free icloud ID. What do i do to create new one

    Hi, i am not able to get a Free icloud ID. Error is my device is not eligible for creating new free icloud ID. What do i do to create new one

    Sir, your Apple ID can be used as an iCloud account as well. They are both the same thing.
    You can learn more from --> Set up your Apple ID for iCloud and iTunes - Apple Support

  • Creating Vendor Master Records from HR Master Records

    Dear Experts,
    I have been using t-code PRAA to create vendor master records from HR master records.  The client would like to have one vendor number for a group of employees (in this case external contractors all working for the same company).  The system won't allow me to link several PERNR to one LIFNR (i.e. error message).
    Is it, however, possible to do this?
    Thank you.
    Edited by: Philip on Jan 14, 2011 9:58 PM

    Hi ,
    PRAA has one to one relation ship , means it created 1 vendor for 1 employee .
    If you are using PERNR then you cant use one vendor to may PERNR .
    Either create them as individual vendor or else have a manual control system in place where in you will have to create a dummy PERNR and then allocate all the cost to this invidual vendor , if you are paying the check to only 1 contractor for say 100 contract employees you can use this .
    else it is a better mechanism and control to have 1 is to 1 in case of employee to vedor .
    Regards ,
    Dewaang T.

  • Update SO after creating missing condition record

    Hi Gurus,
    I was getting error message that missing MWST condition in Order, then I investigated and created missing condition record in VK11. Now I would like to update the Sales order and tried update tab on condition but invain.
    Initially the document was created on 17.11.2008 and today condition record was created 18.11.2008.
    Kindly help me in resolving this.
    Thanks
    Bawa

    Dear Bawa,
    While creating Condition Record "MWST" in VK11/ 12;
    What were the Dates maintained in Fields:
    1. Valid From (try with back-date maintenance)
    2. Valid To (Maintain as 31.12.9999)
    Once done, try to Update with "G - Copy pricing elements unchanged and redetermine taxes", in Sales Order.
    Best Regards,
    Amit

  • Mass download of condition records from ECC to CRM

    Hi Team,
    We need to download many condition records from ECC to CRM. We are doing a request download but it takes lot of time. Is there a way to do a mass download of condition records form ECC to CRM.
    Regards,
    Jan.

    Hi Robert,
    We have all the articles in CRM but the prices are not matching for 2000 articles. Kindly suggest us in doing a mass download of the condition records for those 2000 articles.
    Regards,
    Jan

  • Data source and data target for p.o condition records

    Hi All,
    can any one help me what is the data source for p.o and shedule line  condition records and their data target
    Thanks
    sivakumar R

    hi sri,
    to pick up the condition records from the table table konv with respect to the p.o no  and also schedule line with condition values from table A016 any data souce and any data target are available in standard.
    pl help on this
    Thanks
    sivakumar R
    Edited by: Siva Kumar on Feb 19, 2010 10:22 AM

Maybe you are looking for