EAN/UPC check digit creation with Direct Input

Hi Experts,
I am working on Material data transfer using Direct Input. Requirement is to update the EAN/UPC for each Alt. UOM in Additional data view of Material master.
Further we need to set Indicator for automatic Determining the check digit for EAN .
I got Direct IP structure BMMH8 and BMMH6 for transfeering this data but didnt got Indicator field which I can set to automatic determining the check digit for EAN
Please let me know how to pass indicator for finding the check digit automatically while creating materials using Direct Input method.
Thanks in Advance...
<i>-Harkamal</i>

Hi,
Thnaks for your reply, This is my requirement.
Here my problem is i am trying to upload the data from flatfile which contain materil number, denominator, Actual UOM, Nominator field values.
Which is the data i need to upload into MM02 and MM01, if material number is new then it has to create the material, if material is already existing it has to update the UOM values.
here i am getting data into my internal table INP_DATA, from that i am trying to upload the data to database by using job name MRP_MATERIAL_MASTER_DATA_UPLOAD with direct input program RMDATIND.
when i execute my program i am getting success message all the records writtin from flatfile to application server. and job started message.
then if i go into sm37 screen there i execute the job it is also giving active message. if i refresh it it is showing job completed message.
then i look at job log status. there i found that for existing material it is expecting material type, for new material it is giving some gravity error.
So could u help me in this it will be gr8.
Thanks & Regards,
RamNV

Similar Messages

  • Problem with direct input program while uploading data into database

    TABLES:  BGR00,                        " Mappensatz
             BMM00,                        " MM01/MM02  BTCI-Kopfdaten
             BMMH1,                        " MM01/MM02 Hauptdaten
             BMMH2,                        " Länderdaten (Steuern)
             BMMH3,                        " Prognosewerte
             BMMH4,                        " Verbrauchswerte
             BMMH5,                        " Kurztexte
             BMMH6,                        " Mengeneinheiten
             BMMH7,                        " Langtexte
             BMMH8.                        " Referentielle EAN's
           Satztypen
    DATA:    MAPPENSATZ  LIKE BMM00-STYPE VALUE '0',
             KOPFSATZ    LIKE BMM00-STYPE VALUE '1',
             HAUPTSATZ   LIKE BMM00-STYPE VALUE '2',
             KUN_SATZ    LIKE BMM00-STYPE VALUE 'Z',
             LANDSATZ    LIKE BMM00-STYPE VALUE '3',
             PROGSATZ    LIKE BMM00-STYPE VALUE '4',
             VERBSATZ    LIKE BMM00-STYPE VALUE '5',
             KTEXTSATZ   LIKE BMM00-STYPE VALUE '6',
             MESATZ      LIKE BMM00-STYPE VALUE '7',
             TEXTSATZ    LIKE BMM00-STYPE VALUE '8',
             EANSATZ     LIKE BMM00-STYPE VALUE '9'.
    Common Data Bereich fuer die extern aufgerufenen Routinen
           Initialstrukturen
    DATA:  BEGIN OF COMMON PART RMMMBIMY.
    DATA:    BEGIN OF I_BMM00.
               INCLUDE STRUCTURE BMM00.    " Kopfdaten
    DATA:    END OF I_BMM00.
    DATA:    BEGIN OF I_BMMH1.
               INCLUDE STRUCTURE BMMH1.    " Haupdaten
    DATA:    END OF I_BMMH1.
    DATA:    BEGIN OF I_BMMH2.
               INCLUDE STRUCTURE BMMH2.    " Länderdaten
    DATA:    END OF I_BMMH2.
    DATA:    BEGIN OF I_BMMH3.
               INCLUDE STRUCTURE BMMH3.    " Prognosewerte
    DATA:    END OF I_BMMH3.
    DATA:    BEGIN OF I_BMMH4.
               INCLUDE STRUCTURE BMMH4.    " Verbrauchswerte
    DATA:    END OF I_BMMH4.
    DATA:    BEGIN OF I_BMMH5.
               INCLUDE STRUCTURE BMMH5.    " Kurztexte
    DATA:    END OF I_BMMH5.
    DATA:    BEGIN OF I_BMMH6.
               INCLUDE STRUCTURE BMMH6.    " Mengeneinheiten
    DATA:    END OF I_BMMH6.
    DATA:    BEGIN OF I_BMMH7.
               INCLUDE STRUCTURE BMMH7.    " Textzeilen
    DATA:    END OF I_BMMH7.
    DATA:    BEGIN OF I_BMMH8.
               INCLUDE STRUCTURE BMMH8.    " Referentielle EAN's
    DATA:    END OF I_BMMH8.
    DATA:  END OF COMMON PART.
    DATA: WA LIKE TEDATA-DATA.
           Einzelfelder
    DATA:    GROUP_COUNT(6) TYPE C,    " Anzahl Mappen
             TRANS_COUNT(6) TYPE C,    " alte Definition für rmmmbim0
             SATZ_COUNT  LIKE MUEB_REST-TRANC, " Trans.zähler neu
             H_IND_COUNT LIKE MUEB_REST-D_IND, " Index welches Feld zurücks.
             SATZ2_COUNT(6) TYPE C.    " Anz. Sätze je Trans. ohne Kopfsatz
    DATA:    XEOF(1)          TYPE C,  " X=End of File erreicht
             XHAUPTSATZ_EXIST TYPE C,  " X=Hauptsatz zum Kopf exi.
             NODATA(1)        TYPE C.  " kein BI für dieses Feld
    mk/15.08.94:
    DATA:    GROUP_OPEN(1)  TYPE C.             " X=Mappe schon geöffnet
    *eject
           Konstanten
    DATA:    C_NODATA(1)    TYPE C VALUE '/'.   " Default für NODATA
    DATA:    MATNR_ERW     LIKE MARA-MATNR  VALUE '0                 '.
    DATA:    MATNR_ERW_INT LIKE MARA-MATNR.  "internal sight of '0      '
    DATA:    MATNR_LAST    LIKE MARA-MATNR.  "Material number
    mk/11.08.94 2.1H:
    If this flag is initial, the database updates will be done directly
    during background maintenance instead of using a separate update
    task. (no usage of this flag in dialogue mode!)
    DATA: DBUPDATE_VB(1) VALUE ' '.       "note 306628
    data: matsync type mat_sync. "wk/99a no update in dialog if called
    ***INCLUDE ZMUSD070.
    TABLES: MARA,                          "Material Master: General Data
            MARC,                          "Material Master: C Segment
            MARD,                          "Material Master: St Loc/Batch
            MBEW,                          "Material Valuation
            MVKE,                          "Material Master: Sales Data
            MLGN,                          "Material Data per Whse Number
            MLAN,                          "Tax Classification: Material
            T001W,                         "Plants/Branches
            TBICU.
    DATA: BEGIN OF VALUTAB OCCURS 0.
            INCLUDE STRUCTURE RSPARAMS.
    DATA: END OF VALUTAB.
    DATA: BEGIN OF VARTECH.
            INCLUDE STRUCTURE VARID.
    DATA: END OF VARTECH.
    DATA: PARMS LIKE ZXXDCONV.
    DATA: REC_COUNT      TYPE  I,
          REC_COUNT_BAD  TYPE  I,
          ZJOBID         LIKE  TBIZU-JOBID,
          ZJOBCOUNT      LIKE  TBIZU-JOBCOUNT,
          ZMATNR         LIKE  MARA-MATNR,
          ZTEXT(80)      TYPE  C.
    CONSTANTS: LIT_ZERO(18)  TYPE  C            VALUE '000000000000000000',
               LIT_CHAR      TYPE  C            VALUE '_',
               LIT_CREATE    LIKE  BMM00-TCODE  VALUE 'MM01',
               LIT_CHANGE    LIKE  BMM00-TCODE  VALUE 'MM02',
               LIT_CHECK(1)  TYPE  C            VALUE 'X'.
    DATA:  BEGIN OF INP_DATA OCCURS 0,
             MATNR(18)  TYPE C,            " Material code
             UMREN(6)   TYPE C,            " Denominator
             MEINH(3)   TYPE C,            " Alternate UOM
             UMREZ(6)   TYPE C,            " Numerator
           END OF INP_DATA.
    *eject
    SELECTION-SCREEN BEGIN OF BLOCK INOUT WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (13) TEXT-004.
    PARAMETERS:     P_PC        RADIOBUTTON GROUP SRC DEFAULT 'X'.
    SELECTION-SCREEN COMMENT (6) TEXT-005.
    PARAMETERS:     P_UNIX      RADIOBUTTON GROUP SRC.
    SELECTION-SCREEN COMMENT (6) TEXT-006.
    PARAMETERS:     P_DS_TYP    LIKE     ZXXDCONV-DS_TYP
                                   DEFAULT 'ASC'.
    SELECTION-SCREEN END OF LINE.
    *SELECT-OPTIONS: S_PATH      FOR      PARMS-PATH
                                  NO INTERVALS
                                  LOWER CASE.
    PARAMETERS:  P_PATH TYPE RLGRAP-FILENAME.
    PARAMETERS:     P_HDRLIN   LIKE     ZXXDCONV-HDR_LINES
                                   DEFAULT 0,
                    P_JOBNAM   LIKE     TBICU_S-JOBNAME
                                   MEMORY ID BM1,
                    P_DI_EXE    AS       CHECKBOX
                                   DEFAULT  LIT_CHECK,
                    P_MAPPE     LIKE     BGR00-GROUP
                                   DEFAULT  'MRP_UOM_LOAD'
                                   NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK INOUT.
    *eject
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PATH.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                PROGRAM_NAME  = SYST-REPID
                DYNPRO_NUMBER = SYST-DYNNR
                FIELD_NAME    = 'P_PATH'
           CHANGING
               FILE_NAME     = S_PATH-LOW
                FILE_NAME     = P_PATH
           EXCEPTIONS
                MASK_TOO_LONG = 1
                OTHERS        = 2.
    AT SELECTION-SCREEN.
    Set up parameter record
      PARMS-UNIX      = P_UNIX.
      PARMS-PC        = P_PC.
      PARMS-DS_TYP    = P_DS_TYP.
      PARMS-JOBNAME   = P_JOBNAM.
      PARMS-MAPPE     = P_MAPPE.
      PARMS-HDR_LINES = P_HDRLIN.
    *eject
           Main Processing Routine                                       *
    START-OF-SELECTION.
    Initialization
      PERFORM 0000_HOUSEKEEPING.
    Initialize transaction data in I_BM00
    PERFORM 0500_INIT_BMM00.
    Process input files
    SORT S_PATH BY SIGN OPTION LOW.
         MOVE S_PATH-LOW TO PARMS-PATH.
          MOVE P_PATH TO PARMS-PATH.
    LOOP AT S_PATH.
       AT NEW LOW.
          CLEAR   INP_DATA.
         REFRESH INP_DATA.
    Read source data into internal table
          PERFORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
    Processs each record in internal table
          ZTEXT    = TEXT-007.
          ZTEXT+13 = PARMS-DS_NAME.
          PERFORM 4000_PROGRESS_INDICATOR USING ZTEXT.
    Initialize transaction data in I_BM00
      PERFORM 0500_INIT_BMM00.
          LOOP AT INP_DATA.
    Reset tables for each record
            BMM00              = I_BMM00.
            BMMH1              = I_BMMH1.
            BMMH6              = I_BMMH6.
    Load structures with data
            MOVE-CORRESPONDING INP_DATA TO BMM00.
            PERFORM 2000_WRITE_OUTPUT USING BMM00.
            MOVE-CORRESPONDING INP_DATA TO BMMH1.
            PERFORM 2000_WRITE_OUTPUT USING BMMH1.
            MOVE-CORRESPONDING INP_DATA TO BMMH6.
            PERFORM 2000_WRITE_OUTPUT USING BMMH6.
            REC_COUNT = REC_COUNT + 1.
          ENDLOOP.
       ENDAT.
    ENDLOOP.
      IF  REC_COUNT GT 0
      AND P_DI_EXE  EQ LIT_CHECK.
        PERFORM 3000_START_DI_JOB.
      ENDIF.
    WRITE: / TEXT-008,
               REC_COUNT.
      PERFORM 9000_END_OF_JOB.
    *eject
    Include containing common routines used by direct input programs
      INCLUDE ZMUSD071.
    *eject
          FORM 0500_INIT_BMM00                                          *
          Initialize I_BMM00 with transaction code and views selected   *
    FORM 0500_INIT_BMM00.
    ***this changes done by samson**
    if not inp_data[] is initial.
    select single matnr from mara INTO ZMATNR where matnr = inp_data-matnr.
    if sy-subrc = 0.
      I_BMM00-TCODE = LIT_CHANGE.
    Basic data
      I_BMM00-XEIK1  = LIT_CHECK.
    else.
      I_BMM00-TCODE = LIT_CREATE.
    Basic data
      I_BMM00-XEIK1 = LIT_CHECK.
    endif.
    endif.
    **this changes above done by samson**
    Transaction code
    I_BMM00-TCODE = LIT_CHANGE.
    Basic data
    I_BMM00-XEIK1  = LIT_CHECK.
    ENDFORM.
    INCLUDE ZMUSD069.
    *eject
          FORM 0000_HOUSEKEEPING                                        *
          Initialization routines                                       *
    FORM 0000_HOUSEKEEPING.
      PERFORM 0010_LDS_NAME.
      PERFORM 0020_DS_NAME.
      PERFORM 0030_OPEN_FILE.
      PERFORM 0040_INIT_STRUCTS.
    ENDFORM.
    *eject
          FORM 0010_LDS_NAME                                            *
          Obtain logical file name from DI job details                  *
    FORM 0010_LDS_NAME.
    Check valid job name
      SELECT SINGLE * FROM  TBICU
                      WHERE JOBNAME EQ PARMS-JOBNAME.
      IF SY-SUBRC EQ 0.
        CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA'
             EXPORTING
                  REPORT               = TBICU-REPNAME
                  VARIANT              = TBICU-VARIANT
             IMPORTING
                  TECHN_DATA           = VARTECH
             TABLES
                  VARIANT_VALUES       = VALUTAB
             EXCEPTIONS
                  VARIANT_NON_EXISTENT = 1
                  VARIANT_OBSOLETE     = 2
                  OTHERS               = 3.
        IF SY-SUBRC EQ 0.
          READ TABLE VALUTAB WITH KEY 'LDS_NAME'.
          MOVE VALUTAB-LOW TO PARMS-LDS_NAME.
        ELSE.
          MESSAGE I001 WITH PARMS-JOBNAME.
          MESSAGE A099.
        ENDIF.
      ELSE.
        MESSAGE I000 WITH PARMS-JOBNAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
          FORM 0040_INIT_STRUCTS                                        *
          Initialize structures for direct input records                *
    FORM 0040_INIT_STRUCTS.
    Start of standard SAP initialization from example program RMMMBIME
    *------- Write session record -
      CLEAR BGR00.
      BGR00-STYPE  = MAPPENSATZ.
      BGR00-GROUP  = PARMS-MAPPE.
      BGR00-NODATA = C_NODATA.
      BGR00-MANDT  = SY-MANDT.
      BGR00-USNAM  = SY-UNAME.
      BGR00-START  = BGR00-NODATA.
      BGR00-XKEEP  = BGR00-NODATA.
      PERFORM 2000_WRITE_OUTPUT USING BGR00.
    *----- Initialize structures -
      NODATA = BGR00-NODATA.
      PERFORM INIT_STRUKTUREN_ERZEUGEN(RMMMBIMI) USING NODATA.
    End of standard SAP initialization from example program RMMMBIME
    ENDFORM.
    *eject.
          FORM 3000_START_DI_JOB                                        *
          Start direct input job                                        *
    FORM 3000_START_DI_JOB.
      ZTEXT = 'Starting '(021).
      ZTEXT+9 = TBICU-JOBNAME.
      PERFORM 4000_PROGRESS_INDICATOR USING ZTEXT.
      CALL FUNCTION 'BI_START_JOB'
           EXPORTING
                JOBID                 = ' '
                JOBTEXT               = TBICU-JOBNAME
                REPNAME               = TBICU-REPNAME
                SERVER                = TBICU-EXECSERVER
                VARIANT               = TBICU-VARIANT
                NEW_JOB               = 'X'
                CONTINUE_JOB          = ' '
                START_IMMEDIATE       = 'X'
                DO_NOT_PRINT          = 'X'
                USERNAME              = SY-UNAME
           IMPORTING
                JOBID                 = ZJOBID
                JOBCOUNT              = ZJOBCOUNT
           EXCEPTIONS
                JOB_OPEN_FAILED       = 1
                JOB_CLOSE_FAILED      = 2
                JOB_SUBMIT_FAILED     = 3
                WRONG_PARAMETERS      = 4
                JOB_DOES_NOT_EXIST    = 5
                WRONG_STARTTIME_GIVEN = 6
                JOB_NOT_RELEASED      = 7
                WRONG_VARIANT         = 8
                NO_AUTHORITY          = 9
                DIALOG_CANCELLED      = 10
                JOB_ALREADY_EXISTS    = 11
                PERIODIC_NOT_ALLOWED  = 12
                ERROR_NUMBER_GET_NEXT = 13
                OTHERS                = 14.
      IF SY-SUBRC EQ 0.
        WRITE: / 'Direct input job'(022), TBICU-JOBNAME, 'started'.
      ELSE.
        WRITE: / 'Direct input failed with return code'(023), SY-SUBRC.
      ENDIF.
    FORM 0020_DS_NAME.
      CALL FUNCTION 'FILE_GET_NAME'
           EXPORTING
                CLIENT           = SY-MANDT
                LOGICAL_FILENAME = PARMS-LDS_NAME
                OPERATING_SYSTEM = SY-OPSYS
           IMPORTING
                FILE_NAME        = PARMS-DS_NAME
           EXCEPTIONS
                FILE_NOT_FOUND   = 1
                OTHERS           = 2.
      IF SY-SUBRC NE 0.
        MESSAGE E002 WITH PARMS-LDS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
          FORM 0030_OPEN_FILE                                           *
          Open physical file for output                                 *
    FORM 0030_OPEN_FILE.
    OPEN DATASET PARMS-DS_NAME FOR OUTPUT IN TEXT MODE. "thg191105
      OPEN DATASET PARMS-DS_NAME FOR OUTPUT IN TEXT MODE
                                     encoding default. "thg191105
      IF SY-SUBRC NE 0.
        MESSAGE E003 WITH PARMS-DS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
          FORM 1000_GET_SOURCE_DATA                                     *
          Read source data into internal table                          *
    -->  INP_DATA   " Name of internal table passed as parameter       *
    FORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
      CALL FUNCTION 'Z_FILE_UPLOAD'
           EXPORTING
                UNIX                = PARMS-UNIX
                PC                  = PARMS-PC
                FILETYPE            = PARMS-DS_TYP
                FILENAME            = PARMS-PATH
                HDR_LINES           = PARMS-HDR_LINES
           TABLES
                DATA_TAB            = INP_DATA
           EXCEPTIONS
                CONVERSION_ERROR    = 1
                FILE_OPEN_ERROR     = 2
                FILE_READ_ERROR     = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                INVALID_SOURCE      = 8
                OTHERS              = 9.
    ENDFORM.
    *eject
          FORM 2000_WRITE_OUTPUT                                        *
          Write record in standard SAP structure to UNIX file           *
    -->  I_STRUCT   " Name of record passed as parameter               *
    *FORM 2000_WRITE_OUTPUT USING I_STRUCT."SRY28NOV05
    FORM 2000_WRITE_OUTPUT USING I_STRUCT TYPE ANY.      "SRY28NOV05
       TRANSFER I_STRUCT TO PARMS-DS_NAME.
      IF SY-SUBRC NE 0.
        MESSAGE E004 WITH PARMS-DS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
    *&      Form  2100_WS_DOWNLOAD
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM 2100_WS_DOWNLOAD TABLES INP_DATA.
    DATA: FILENAME LIKE RLGRAP-FILENAME.   "SRY28NOV05
      DATA: W_FILENAME TYPE STRING.             "SRY28NOV05
      DATA: W_FTYP(10) TYPE C VALUE 'DAT'.      "SRY28NOV05
    MOVE PARMS-DS_NAME TO FILENAME.       "SRY28NOV05
      MOVE PARMS-DS_NAME TO W_FILENAME.      "SRY28NOV05
    *BEGIN OF BLOCK COMMENT BY SRY28NOV05
    CALL FUNCTION 'WS_DOWNLOAD'
          EXPORTING
            BIN_FILESIZE        = ' '
            CODEPAGE            = ' '
               FILENAME            = FILENAME
               FILETYPE            = 'DAT'
            MODE                = ' '
            WK1_N_FORMAT        = ' '
            WK1_N_SIZE          = ' '
            WK1_T_FORMAT        = ' '
            WK1_T_SIZE          = ' '
            COL_SELECT          = ' '
            COL_SELECTMASK      = ' '
       importing
            filelength          =
          TABLES
               DATA_TAB            = INP_DATA
            FIELDNAMES          =
          EXCEPTIONS
               FILE_OPEN_ERROR     = 1
               FILE_WRITE_ERROR    = 2
               INVALID_FILESIZE    = 3
               INVALID_TABLE_WIDTH = 4
               INVALID_TYPE        = 5
               NO_BATCH            = 6
               UNKNOWN_ERROR       = 7
               OTHERS              = 8.
    *END OF BLOCK COMMENT BY SRY28NOV05
    *BEGIN OF BLOCK ADDED BY SRY28NOV05
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = W_FILENAME
          FILETYPE                        = W_FTYP
        TABLES
          DATA_TAB                        = INP_DATA
       EXCEPTIONS
         FILE_WRITE_ERROR                = 1
         NO_BATCH                        = 2
         GUI_REFUSE_FILETRANSFER         = 3
         INVALID_TYPE                    = 4
         NO_AUTHORITY                    = 5
         UNKNOWN_ERROR                   = 6
         HEADER_NOT_ALLOWED              = 7
         SEPARATOR_NOT_ALLOWED           = 8
         FILESIZE_NOT_ALLOWED            = 9
         HEADER_TOO_LONG                 = 10
         DP_ERROR_CREATE                 = 11
         DP_ERROR_SEND                   = 12
         DP_ERROR_WRITE                  = 13
         UNKNOWN_DP_ERROR                = 14
         ACCESS_DENIED                   = 15
         DP_OUT_OF_MEMORY                = 16
         DISK_FULL                       = 17
         DP_TIMEOUT                      = 18
         FILE_NOT_FOUND                  = 19
         DATAPROVIDER_EXCEPTION          = 20
         CONTROL_FLUSH_ERROR             = 21
         OTHERS                          = 22.
      IF SY-SUBRC NE 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *END OF BLOCK ADDED BY SRY28NOV05
    ENDFORM.                               " 2100_WS_DOWNLOAD
    *eject
          FORM 4000_PROGRESS_INDICATOR                                  *
          Write progress text to status bar                             *
    -->  TEXT   " Text passed as parameter                             *
    FORM 4000_PROGRESS_INDICATOR USING TEXT.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                PERCENTAGE = 0
                TEXT       = TEXT
           EXCEPTIONS
                OTHERS     = 1.
    ENDFORM.
    *eject.
          FORM 9000_END_OF_JOB                                          *
          Close files on UNIX                                           *
    FORM 9000_END_OF_JOB.
      CLOSE DATASET PARMS-DS_NAME.
    ENDFORM.
    FORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
      CALL FUNCTION 'Z_FILE_UPLOAD'
           EXPORTING
                UNIX                = PARMS-UNIX
                PC                  = PARMS-PC
                FILETYPE            = PARMS-DS_TYP
                FILENAME            = PARMS-PATH
                HDR_LINES           = PARMS-HDR_LINES
           TABLES
                DATA_TAB            = INP_DATA
           EXCEPTIONS
                CONVERSION_ERROR    = 1
                FILE_OPEN_ERROR     = 2
                FILE_READ_ERROR     = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                INVALID_SOURCE      = 8
                OTHERS              = 9.
    ENDFORM.
    *eject
          FORM 2000_WRITE_OUTPUT                                        *
          Write record in standard SAP structure to UNIX file           *
    -->  I_STRUCT   " Name of record passed as parameter               *
    *FORM 2000_WRITE_OUTPUT USING I_STRUCT."SRY28NOV05
    FORM 2000_WRITE_OUTPUT USING I_STRUCT TYPE ANY.      "SRY28NOV05
       TRANSFER I_STRUCT TO PARMS-DS_NAME.
      IF SY-SUBRC NE 0.
        MESSAGE E004 WITH PARMS-DS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
    *&      Form  2100_WS_DOWNLOAD
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM 2100_WS_DOWNLOAD TABLES INP_DATA.

    Hi,
    Thnaks for your reply, This is my requirement.
    Here my problem is i am trying to upload the data from flatfile which contain materil number, denominator, Actual UOM, Nominator field values.
    Which is the data i need to upload into MM02 and MM01, if material number is new then it has to create the material, if material is already existing it has to update the UOM values.
    here i am getting data into my internal table INP_DATA, from that i am trying to upload the data to database by using job name MRP_MATERIAL_MASTER_DATA_UPLOAD with direct input program RMDATIND.
    when i execute my program i am getting success message all the records writtin from flatfile to application server. and job started message.
    then if i go into sm37 screen there i execute the job it is also giving active message. if i refresh it it is showing job completed message.
    then i look at job log status. there i found that for existing material it is expecting material type, for new material it is giving some gravity error.
    So could u help me in this it will be gr8.
    Thanks & Regards,
    RamNV

  • Tax issue with Direct Input mode of RFBIBL00

    Hi, I have a problem using <b>RFBIBL00</b> (direct input mode) to create A/R invoices. There is no tax associated with the invoice, however, when I use direct input mode, instead of posting immediately, a batch input session is created. In the log, an <b>information</b> message: <i>'Specify a tax jurisdiction key'</i>. The BDC session is processed with no error.
    When using Call transaction mode for RFBIBL00, the document is posted immediately but the requirement is to use Direct input mode.
    There is no converted data in the BBTAX structure since the doc. does not need to post to tax account. Do I need to populate the Tax amount, Tax code and jurisdiction code in this structure and BBSEG in order to by pass the information message?
    Any advice is appreciated.
    - Minami

    Problem solved. Just need to untie the relationship between the ITEM import structure and the BBTAX so the Direct Input program will not require a tax jurisdiction code.

  • LSMW updating problem with direct input method

    Hi!
    Using version 4.0.0 of the LSM Workbench from 2001-07-01 on SAP R/3 4.7, I need to update the purchase order text and wanted to use the direct input method.  I found a tutorial on SAPTechnical which I followed.  All went well, the input data was converted and at last I got the message:
    "Long Texts in Total : 2
    Successfully Transferred Long Texts : 2
    Non-Transferred Long Texts : 0"
    My trials are recorded in table STXH with date and time and also in the material master change history.  However, the result in the material master is that the purchase order text is NOT updated.
    Can anyone tell me why this might be?

    Hi Santosh!
    First of all, thank you very much for posting an answer.  But unfortunately it was of no help.  I want to update the purchase order text on a material that already has the purchasing and purchase order text views. When I compare the PO text before and after my "Successfuly Transferred Long Texts" there is no change.  I hope that this make it more clear but it is still a mystery to me.

  • Special character "/" replacing with blank with Direct Input Method posting

    Hi All,
    I am posting FI historical data using Direct Input Method. Payment term contains special character "/"( I/E). SAP standard program replacing Special character "/" with blank (I E) so document posting is failing. Could you please advise.
    Thanks
    Chandra.

    Can You please specify the Transaction code and SAP program name for direct input.

  • Lsmw with direct input

    hi,
    iam getting error in 11th step create batch input session for ie01 t-code.converted data is displaying
    but batch input session is not getting created for object 0400 method 0001 for pgm name ibip.plz help me out.
    thanks.

    Hi Komal
    Have you deleted First Line in text File...
    One Of the reason for this error is if u dont delete First Line in Text File....
    try this....
    Check for blanks in Excel...
    Check for Source Fields..
    Also Check any Unnecessary Space is there in ur excel file......
    Regards
    Smitha
    Edited by: Smitha KB on Feb 25, 2009 1:08 PM
    Edited by: Smitha KB on Feb 25, 2009 1:14 PM

  • BDC-Direct Input

    Please give an example for Direct Input method in BDC.When it is used? what is the advantage and disadvantage?

    Hi Khanna Renga ,
    Direct Input method is used for bulk transfer of data into SAP system.It results in faster execution since no screens are processed and the SAP database will be updated directly using the standard function modules.
    Better example where direct input method will be used is... uploading the data for material master.....it includes lot of views so its very much difficult to capture all the views and record the tcode and map the data in such conditions its better to go with DI methods
    Advantages:
    in session method or Call Transaction method while uploading the data u do the validation by fallowing the screen sequence and field sequence where as in Direct Input validations can be done set of code so this make the process very fast so its advantageous to upload large amout of data.
    you always use the standard sap provided program for this.
    Here in Direct Input method very important thing is structure of flat file... so to know the structure first of all you have to download the data for one record into the internal table with the use of the same program then with the use of that structure u have to desing the flat file and upload the data.
    Direct Input:
    With direct input, the SAP function modules execute the consistency checks. However with batch input, these consistency checks are executed with help of the screens. This means that direct input has considerable performance advantages. But there are a few programs for direct input, you can use them if it accomplishes your goal. Direct Input programs work like that they update database tables directly. As you know that it is forbidden to update SAP database tables directly, since consistency and security should be considered. Exceptions are these direct input programs. So you are not able to write custom ABAP direct input programs. But of course you can write ABAP programs to update custom database tables (Z tables), if you are sure all about consistency.
    SAP has created direct input programs because SAP wanted to enhance the batch input procedure, since batch input is slower. SAP offers the direct input technique, especially for transferring large amount of data. In contrast to batch input, this technique does not create sessions, but stores, updates, inserts data directly. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or transaction BMV0.
    Examples for direct input programs are:
    RFBIBL00 - FI
    RMDATIND - MM
    RVAFSS00 - SD
    RAALTD11 - AM
    RKEVEXTO - CO-PA
    Also have a look on below thread..
    Re: re: direct input method
    Re: Give a BDC example by Direct Input Method
    In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
    Hope it will solve your doubts and problem..
    Reward points if useful..
    Thanks & Regards
    ilesh 24x7

  • Direct input in bdc

    Hi all,
         Can anyone explain me what is the use of direct input method over call transaction /  session method....
    Regards,
    subbu.

    hi,
    Data is transferred from an external system into the SAP R/3 System. You use data transfer when you:
    Transfer data from an external system into an R/3 System as it is installed.
    Transfer data regularly from an external system into an R/3 System.
    There are three basic methods for Data Transfer:
    Direct Input (DINP)
    With direct input, the SAP function modules execute the consistency checks. However with batch input, these consistency checks are executed with help of the screens. This means that direct input has considerable performance advantages. But there are a few programs for direct input, you can use them if it accomplishes your goal. Direct Input programs work like that they update database tables directly. As you know that it is forbidden to update SAP database tables directly, since consistency and security should be considered. Exceptions are these direct input programs. So you are not able to write custom ABAP direct input programs. But of course you can write ABAP programs to update custom database tables (Z tables), if you are sure all about consistency.
    So why SAP has created direct input programs? Because SAP wanted to enhance the batch input procedure, since batch input is slower. SAP offers the direct input technique, especially for transferring large amount of data. In contrast to batch input, this technique does not create sessions, but stores, updates, inserts data directly. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or transaction BMV0.
    Examples for direct input programs are:
    RFBIBL00 - FI
    RMDATIND - MM
    RVAFSS00 - SD
    RAALTD11 - AM
    RKEVEXTO - CO-PA
    CALL TRANSACTION
    It seems like batch input method. Data consistency check with help of screen logic.
    Batch Input with batch input sessions.
    Data consistency check with help of screen logic. Batch Input is a standard technique for transferring large sets of data into the SAP System. The transaction flow is transferred as if it were entered online. The advantage of this is that all relevant check for the transaction are executed, thereby ensuring that the data is consistent.
    Hope this helps, Do reward.

  • Direct Input Programs in SAP

    Hi,
    Can anybody provide me the list of Direct Input programs available in SAP.
    Thanks,
    Sunil.

    hI,
    Direct Input:
    A recent technique to input data safely. An alternative to batch input.
    With direct input, the SAP function modules execute the consistency checks. However with batch input, these consistency checks are executed with help of the screens. This means that direct input has considerable performance advantages. But there are a few programs for direct input, you can use them if it accomplishes your goal. Direct Input programs work like that they update database tables directly. As you know that it is forbidden to update SAP database tables directly, since consistency and security should be considered. Exceptions are these direct input programs. So you are not able to write custom ABAP direct input programs. But of course you can write ABAP programs to update custom database tables (Z tables), if you are sure all about consistency.
    SAP has created direct input programs because SAP wanted to enhance the batch input procedure, since batch input is slower. SAP offers the direct input technique, especially for transferring large amount of data. In contrast to batch input, this technique does not create sessions, but stores, updates, inserts data directly. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or transaction BMV0.
    Examples for direct input programs are:
    RFBIBL00 - FI
    RMDATIND - MM
    RVAFSS00 - SD
    RAALTD11 - AM
    RKEVEXTO - CO-PA
    Regards
    Kiran Sure

  • LSMW to create Sales Order using direct input RVINVB10

    Hi,
    I need advise on 2 parts of Sales Order creation using direct input program RVINVB10.
    1) How do I enter the WBS Element PS_POSID in the item line of Account Assignment tab? There does not seem to be a field in the direct input program structure to fill this in.
    2) How can I fill in item tab 'Billing Plan' that appears only when Item Category = 'Milestone Billing'?
    Thanks

    Nandan,
    Please go through the documentation of the BAPI. It gives you details of what needs to be filled in in which structure/parmater. Also, read the documentation associated with each structure, that will tell what to fill.
    It is really hard to explain it in simple terms as to what are required. But, you need the header, items and partners at the minimum. Also, with some of these structures there are also 'X' structures(like ORDER_ITEMS_INX for ORDER_ITEMS_IN) which should also be filled based on what fields you filled in the original structure. For example, if you filled 'MATERIAL' field on the ORDER_ITEMS_IN structure, you should also fill in the same field on the ORDER_ITEMS_INX structure with an 'X' in it.
    All this is well documented in the BAPI.
    Srinivas

  • Can anybody tell me why "Direct Input Method of BDC" said to be Obselete?

    Why it is said that "Direct Input Method of BDC" is obselete?

    hi,
    Direct Input:
    A recent technique to input data safely. An alternative to batch input.
    With direct input, the SAP function modules execute the consistency checks. However with batch input, these consistency checks are executed with help of the screens. This means that direct input has considerable performance advantages. But there are a few programs for direct input, you can use them if it accomplishes your goal. Direct Input programs work like that they update database tables directly. As you know that it is forbidden to update SAP database tables directly, since consistency and security should be considered. Exceptions are these direct input programs. So you are not able to write custom ABAP direct input programs. But of course you can write ABAP programs to update custom database tables (Z tables), if you are sure all about consistency.
    SAP has created direct input programs because SAP wanted to enhance the batch input procedure, since batch input is slower. SAP offers the direct input technique, especially for transferring large amount of data. In contrast to batch input, this technique does not create sessions, but stores, updates, inserts data directly. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or transaction BMV0.
    Examples for direct input programs are:
    RFBIBL00 - FI
    RMDATIND - MM
    RVAFSS00 - SD
    RAALTD11 - AM
    RKEVEXTO - CO-PA
    I hope it helps.
    In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
    cheers!'sri

  • Warehouse receiving using vendor EAN/UPC code

    Is it possible to capture the vendor EAN/UPC code and use this information to receive the goods in the warehouse/plant?
    First issue would be how to deal with duplicate vendor EAN/UPC.
    I have seen many posts where it is possible in IS-AFS but has anyone done this in standard R/3?
    Thanks

    You can certainly search by EAN/UPC when performing GR with MIGO. Click on the binoculars and it's the fifth field available to search via.
    So as long as you have the code set against the material master . . .
    Regards,
    Nick

  • LSMW- DIRECT INPUT - FOR ME11--------  ?

    hello
    hi I want update purchase info records By using lsmw with direct input/bach input method
    pls send documentation for this
    thanks

    Hi,
    Use SAP standard program RM06IBI0.
    LSMW Object 0060
    Method 0000
    You can also use FM ME_POST_INFORECORD
    Regards,
    Satish

  • RFBIBL01 : direct input in background

    Hello,
    I want to run the program RFBIBL01 with direct input intergration in background. I create the job with tcode SM36 to start immediately.
    I get an error. SAP says that the parameters of the variante are not correct.
    Can anyone give me some input.
    Thanks in advance.

    What are the parameters? It may be a file name problem.
    rob

  • Global Creation with Input args

    I create a Global Creation activity with a screenflow task. The screenflow has both a integer input argument (call it sfIntArg) and a output argument (of BPM object).
    When I right-click on the Global creation activity and go to argument mapping, I have trouble mapping the screenflow input argument. I am not sure what to specify in the "Value" field to map to sfIntArg.
    1. when I specify nothing to map to sfIntArg (sfIntArg = empty/null), then I get the message "express is expected".
    2. when I do not specify the argument mapping, I get "All arguments must be satisfied"
    3. when I choose a instance variable of the process, I get "xxx is not a static member of project.process.instance"
    I want to invoke the Global Creation with WAPI and pass the value for sfIntArg to the Global Creation.

    Hi,
    It's odd that you see no errors in your project.
    1. Make sure that you just have one project open in your Project Navigator tab.
    2. In the Project Navigator tab, double click the name of the process. Look at the "Outline" tab directly below the Project Navigator tab (click Window -> Reset Perspective if you don't see the Outline tab). Expand Methods and double click each of the methods to find the offending logic with the "var1" syntax that is causing your problem. Do this for each of your processes.
    Dan

Maybe you are looking for

  • Often get lots of adds etc when I go to a URL. How can I stop this?

    I often get windows that overlay my Firefox screen. They are often at the bottom or top of my Firefox screen. Also, other sessions of Firefox often appear to start and I can only see them if I look in the task bar. It looks like they may be from ad.d

  • Airport utility doesn't support my airport express

    I just noticed my Airport Express isn't showing up in the Airport Utility, i mean, it shows up but there's no light on, not green or orange, just no light at all. When i click on the icon in the Airport Utility, it says this version of Airport Utilit

  • Firefox will not let me bookmark anything. Bookmarks don't show in "organize bookmarks."

    In the last few months Firefox will not bookmark anything. I click "bookmark this page" but nothing happens and the page does not show up in my bookmarks window. There are also a lot of bookmarks not in folders that do not show up when I click "organ

  • Flashlite 1.1 migration

    Hi, I hope that someone can help me out on this trivial problem. I have been re-coding some of my old flash content written for flashlite 1.1 to flashlite 2.1. With a lot of digging and researching via google and adobe's documentation I have identifi

  • Export prefedrences for XDcam in Log and Transfer

    I have the XDcam pluggin for Final Cut. But when importing my footage I would like to export (or transfer) as Pro Res. can anyone tell me if this can be done? Thanks Jeff