Direct input

wat is the executable program to upload purchase  order data from flat file to purchase order application ME21

Hi ,
Hope you can write a call transaction program for this  or you might go for this BAPI called <b>BAPI_PO_CREATE</b> to create purchase orders .
Thanks ,
Varun .
Message was edited by:
        varun sonu

Similar Messages

  • Error in uploading the PO while running Direct Input porgram RM06EEI0

    Hi all
    i have written one conversion program to upload PO. Here in the program i am populating the batch input structures MBEPOH and MBEPOI and finally writing it to the unix file.
    Finally when i execute the direct input program RM06EEI0
    using the logical filename , it gives the error as 'Net price should be greater than 0' .
    i have also checked the file in the unix directory , there the net price is getting populated correctly. Also i debugged the direct input program and found out that net price is getting passed correctly to FM ME_CREATE_PO_ITEM but somewhere  the KOMP   structure is not getting populated ,that is why net price becomes 0.
    Can anybody please tell whether there is some issue in writing the conversion program or i am missing some parameters to be passed in MBEPOH or MBEPOI, or what has to be done.
    Please help me , it is urgent .
    Thanks and Regards,
    Syed

    I have the same problem, could somebody help?
    Thanx, Marian

  • 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 direct input method

    Hi
      What is the procedure to include a specific program / report in the drop down box of program name of Direct Input method in LSMW?
    What is the diff. between Physical path and Logical path?
    How can we give our input data using logical path when we execute some standard batch or direct input programs?
    Ex. RMDATIND.

    http://help.sap.com/saphelp_erp2005vp/helpdata/en/87/f3ae63e68111d1b3ff006094b944c8/frameset.htm
    Regards,
    Amit

  • "Indicator: GR-Based Invoice Verification" direct input Upld PO LSMW

    Hi, Im using lsmw direct input method. I am uploading the PO. But the GR Based invoice verification field was not checked ON. Im trying this using USER_EXIT in enhancement MM06E005, with EXIT_SAPMM06E_017.
    Any body can tell me how i can check ON the field WEBRE( GR based invoice verification) while creating the PO through LSWM.
    regards
    RAJ

    Hi,
    How you solved, kindly explain
    Also explain how to upload PO through LSMW in the case of multiple line items for single PO?
    Thanks & Regards
    Ravi

  • 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

  • Problem while updating the forecast value in m.master by direct input menth

    Hi All
      Good Day
      I am updating the forecast value in material master by direct input method.
    my program is working fine when I am running it online.
    but when i am runnig in back ground I am getting one error which is mentioned below
                                                                                    Job ZM_OPTIMIZA_UPLOAD: Data does not match the job definition; job terminated    BD    078     E    
    Please anyone can help ne in above case.
    Thanks in advance.
    Cheers
    Vallabhaneni

    Hi Hakim
    How are you
    Thanks for your valuable suggestion.
    I am executing my program in background with bmv0 transaction with variant, in development I can run this job in background with out any logical errors but in QA I am getting errors.
    Can you please help me in the above case.
    In Bmv0 transaction first I defined the job and in  program rmdatind (execute) screen first I mentioned the Max. no of logical errors as 500 and Transactions per commit unit as 500 and I run the program in background in bmv0 transaction and I am getting the message background job terminated immediately
    Because of this again I changed the Max. no of logical errors 500 to 99999 and transaction per commit unit 500 to 999999 and then i scheduled my program in background.
    Alomost it ran for 27 hours and then it has given the message background job terminated.
    Job log entries are as follows.
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040840; material number SUJ82J8400; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040840: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040841; material number SUJ84G3001; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040841: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040842; material number SUJ84G3002; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040842: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040843; material number SUJ86G0100; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040843: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040844; material number SUJ86G0300; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040844: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040845; material number SUJ86G0900; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040845: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040846; material number SUJ86G9600; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040846: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040847; material number SUJ86G9601; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040847: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:19:46  Transaction 0000040848; material number SUJ86J0000; error gravity E       
    22.12.2008  11:19:46  Transaction 0000040848: Taxes for sales org.  cannot be transferred       
    22.12.2008  11:19:46  A system error has occurred while locking                                 
    22.12.2008  11:20:54  Transaction 0000040848 completed Mat. no.  No. of log. errors 0000040848  
    22.12.2008  11:21:30  ABAP/4 processor: TSV_TNEW_PAGE_ALLOC_FAILED                              
    22.12.2008  11:21:30  Job cancelled      
    I know it has taken long time to process the job  because of I changed the transactions per commit unit (500 to 999999) it kills the system
    But I am supposed to provide some number < 999999 in transactions per commit unit
    actually I haven't tried like I said above < 999999 because i don't have any hopes.
    Please look at this problem and help me in this case.
    Thanks in advance.
    Vallabhaneni

  • Direct input (DINP) in Lsmw

    Hii All,
    I am using direct input method for uploading Material Forecasting  in SAP server ...
    But the problem is that , I m not able to get the error log ie im not getting the material no.
    that are ended up in error while uploading. Actually, i can see the material that are in
    error but im not abe to save it or download it,So as to pass it to functional Consultants.
    Im using the RMDATIND program to upload the file.
    Requesting all to provide some suggestion to get /capture the error data.
    Thanks in Advance.
    Chandan

    hi Venu
    can you please tell me why do u want to upload data from adrc table.
    thanks
    abdul

  • LSMW Direct input method error

    Hi experts,
       I created the LSMW using direct input method (PR Creation).
       In the create batch input session step (executed) i am getting below
    message and follwed bt processing terminated message and going out
      Transaction 0: transaction code / not supported
    what could be the problem ? any problem in specifying logical path .
    pls let me know the solution.
    Thanks
    sai

    Hi chenna,
       Thanks for reply, I added the tcode and now getting the message like the session was created
    but when i see in sm35 there is no  seesion created and there is no log also.
    what could be the reason? pls explain
    thanks
    sai

  • 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.

  • LSMW Direct input for Material Master

    Hi,
    I need to upload the following views data into SAP using direct input (RMDATIND)
    Basic Data 1
    Basic Data 2
    Classification
    Sales: Sales Org. Data 1
    Sales: Sales Org. Data 2
    Sales: General/Plant Data
    Foreign Trade: Export Data
    Sales Text
    Purchasing
    Foreign Trade: Import Data
    Purchase Order Text
    Work Scheduling
    General Plant Data / Storage 1
    General Plant Data / Storage 2
    Accounting 1
    Accounting 2
    Costing 1
    Costing 2
    Is it possible to upload these views through direct input or is there any limitation with the direct input method because i'm able to map the below fields only once
    Country of Origin
    Region of Origin
    Excemption Certificate
    Ex. Certificate number
    Issue date of Cert. No.
    Indicator: Military goods
    the above fields are repeated twice for the views
    Foreign Trade: Export Data
    Foreign Trade: Import Data
    If anybody has done material master in lsmw please let me know.
    Thanks in advance.
    Poorna

    Hi,
    I need to upload the following views data into SAP using direct input (RMDATIND)
    Basic Data 1
    Basic Data 2
    Classification
    Sales: Sales Org. Data 1
    Sales: Sales Org. Data 2
    Sales: General/Plant Data
    Foreign Trade: Export Data
    Sales Text
    Purchasing
    Foreign Trade: Import Data
    Purchase Order Text
    Work Scheduling
    General Plant Data / Storage 1
    General Plant Data / Storage 2
    Accounting 1
    Accounting 2
    Costing 1
    Costing 2
    Is it possible to upload these views through direct input or is there any limitation with the direct input method because i'm able to map the below fields only once
    Country of Origin
    Region of Origin
    Excemption Certificate
    Ex. Certificate number
    Issue date of Cert. No.
    Indicator: Military goods
    the above fields are repeated twice for the views
    Foreign Trade: Export Data
    Foreign Trade: Import Data
    If anybody has done material master in lsmw please let me know.
    Thanks in advance.
    Poorna

  • Doubt in BDC direct input method

    Hi experts
    I dont know how to upload data in SAP data base by using BDC direct input coding method. Can u people explain this with coding?
    Thanks in advance.
    Regards
    Antony

    Hi,
    DI is used when u r going upload large amount of data for single application.
    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 CT method while uploading the data u do the validation by fallowing the screen sequence and field sequence where as in DI 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 DI 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.
    Re: re: direct input method
    Award points if useful.
    Thanks,
    Ravee...

  • Lsmw : Direct Input : 0020 Material Master :Error

    hi all !
    I'm onto making a lsmw for material master direct input.i'm facing the following error : 
    1.The field Marc-LADGR is defined as a required field : it doesnt contain an entry
    2.You have not fully maintained the tax classifications.
    in my flat file i have duly filled in the field MARC-LADGR
    need help ,plz see if you can track wats the problem.
    thanks and regards,
    sachin

    ya sachin ... as u r telling .. download from the std program... & continue the process....
    my suggestion ... cross check again with ur fields of the source structure ....i mean decalre only fields .. which are required .. then do the field mapping again for the all the fields...
    i believe there will be documentation for the std program .... check it & go thru with that ..map it ... wherever needed ....
    try & let me know...
    thanks,
    manjunath ms

  • Call transaction in Direct input method

    Hi All
      how do i use call transaction in direct input  method.
    thanks all

    Hi,
    Direct input is different and Call transaction is different.
    In Direct input method,the data will be uploaded directly into the table.
    In call transaction you can change the data before uploading into dictionary table by using tcode
    Ex for Direct input method
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    Ex for Call transaction
    DATA: BEGIN OF itab OCCURS 0,
          str(255),
          END OF itab.
    DATA: BEGIN OF itab1 OCCURS 0,
          lifnr LIKE lfa1-lifnr,
          name1 LIKE lfa1-name1,
          ort01 LIKE lfa1-ort01,
          END OF itab1.
    DATA: jtab LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: ktab TYPE TABLE OF bdcmsgcoll,
          wa TYPE bdcmsgcoll.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile4.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'no file exist'.
    ENDIF.
    LOOP AT itab.
      SPLIT itab-str AT ',' INTO itab1-lifnr itab1-name1 itab1-ort01.
      APPEND itab1.
    ENDLOOP.
    LOOP AT itab1.
      PERFORM prginfo USING 'SAPMZBDCCT' '123'.
      PERFORM fldinfo USING 'i01' itab1-lifnr.
      PERFORM fldinfo USING 'i02' itab1-name1.
      PERFORM fldinfo USING 'i03' itab1-ort01.
      CALL TRANSACTION 'ZCSBDCCT' USING jtab
                                        MODE 'N'
                                        MESSAGES INTO ktab.
    ENDLOOP.
    --- Display the Status messages ---
    LOOP AT ktab INTO wa WHERE msgtyp = 'E'.
      WRITE:/ wa.
    ENDLOOP.
    *&      Form  prginfo
          text
         -->PRGNAME    text
         -->SCRNUMBER  text
    FORM prginfo USING prgname scrnumber.
      CLEAR jtab.
      REFRESH jtab.
      jtab-program = prgname.
      jtab-dynpro = scrnumber.
      jtab-dynbegin = 'X'.
      APPEND jtab.
    ENDFORM.                    "prginfo
    *&      Form  fldinfo
          text
         -->FLDNM      text
         -->FLDVAL     text
    FORM fldinfo USING fldnm fldval.
      CLEAR jtab.
      jtab-fnam = fldnm.
      jtab-fval = fldval.
      APPEND jtab.
    ENDFORM.                    "fldinfo
    MPP CODE.
    TOP-INCLUDE.
    DATA: OK_CODE TYPE SY-UCOMM.
    DATA: I01(10),I02(20),I03(26).
    DATA: WA TYPE LFA1.
    PAI
    CASE OK_CODE.
       WHEN 'INSERT'.
         MOVE I01 TO WA-LIFNR.
         MOVE I02 TO WA-NAME1.
         MOVE I03 TO WA-ORT01.
         INSERT INTO LFA1 VALUES WA.
         IF SY-SUBRC = 0.
           MESSAGE I001(ZCSMSG).
         ELSE.
           MESSAGE I002(ZCSMSG).
         ENDIF.
       WHEN 'EXIT'.
         LEAVE PROGRAM.
    ENDCASE.
    Reward,if useful.
    Thanks,
    Chandu

  • How to use copy of standard program for direct input in LSMW

    currently we're using object 0085 Purchase Orders and and method 0001 for standard direct input, which is processed with program RM06EEI0
    now I want to set an additional flag and avoid creating it by means of BUS PurchaseOrder.CreateFromData1 method (coz the structure is quite different and more complex).
    so my question is now how can i assign a copy of the standard program for processing?
    for better understanding I've attached a screenshot of the according screen
    [img]http://img71.imageshack.us/img71/1558/lsmwcr6.jpg[/img]

    ok, solution was to maintain table SXDA1 (SAPDXfer: Data Transfer Objects and Sub-Category).
    modify entries for DXPRG, DXPR1 and LOADPRG with custom program names

  • How to use RFBIBL00 as direct input in LSMW

    Can any one Please help how to use RFBIBL00 as direct input in LSMW ? How should be structure Same level or subordinate level as I will be having single text file ?
    I have around 15 fields with me
    BKPF
    STYPE     C     1
    BLDAT     C     10
    BLART     C     2
    BUKRS     C     4
    BUDAT     C     10
    XBLNR     C     10
    WAERS     C     3
    XPRFG     C     1
    XMWST     C     1
    BSEG
    STYPE     C     1
    NEWBS     C     2
    DMBTR     C     10
    KOSTL     C     10
    SGTXT     C     10
    PRCTR     C     10
    NEWKO     C     10
    MWSKZ     C     2
    Thanks and Regards
    Guru

    Hi,
    look testabap RFBIBLT0, which creates testfile
    A.

Maybe you are looking for

  • SharePoint Worflow Issue

    In SharePoint 2010 designer workflow, when user tries to approve task item created in task list, Very frequently task items get locked and. 1. It displays a message like current item has been locked. 2 Sometime sharePoint 2010 designer workflow displ

  • Error 080020022 when burning DVD

    I get this error when I tried to burn a movie having made the movie in iMovie. I have OS 10.8.6. I have tried various DVDs. I can burn a plain cd with file on it. I have done all software updates through apple. Thanks for your help.

  • Company Name

    Hi Experts, I am facing an issue in the system with the company name. I had registered a company A B C in the system, however on request of the client i had to change it to ABC. The changes have taken place and the name appears as ABC in the company

  • Debugging JSP with Eclipse

    Hi, how to connect to Oracle Database 9i R2 with Eclipse?

  • ENVY 4500 CONNECTS TO WIFI, BUT WON'T PRINT

    I AM USING A MAC LAPTOP RUNNING OSX 10.7.4.  I ORIGINALLY INSTALLED THIS WIRELESS PRINTER USING THE WIZARD AND I HAD NO PROBLEMS PRINTING UNTIL I CHANGED MY ROUTER.  NOW, EVEN THOUGH I PRINTED OUT THE WIRELESS NETWORK TEST RESULTS PAGE WHICH SHOWS TH