BDC for Purchase order text updation in MM02 Transaction

Hi ALL,
I am updating purchase order text of a material in MM02 using BDC program.
I have done recording, and the program is updating text if the text field already contains some value. but,
when the field is empty and if the program tries to feed new data then it is not working.
Please help me!
regds,
Rajan

Hi
material master purchase order long text
you can use through BDC or LSMW it is possible,
here we need to check in lsmw  Direct input mentod Program name "/SAPDMC/SAP_LSMW_IMPORT_TEXTS"  object name (0001) method(0001) program type (D).
Header we have ---  MATNR and TEXT ID
Item ---LINE(Text line).
in header- for NAME and ID map the source fields MATNR and TEXID respectively.
OBJECT and SPRAS pass the constants.
in Item--for TEXTFORMAT pass the constant '*' and for the TEXTLINE map the input field LINE of the ITEM structure.
    or else u can check in SE37 'CREATE_TEXT'   , in that function module check it object Id , name , spras, lineitem,  language "E"
here i mention example of text flat file,
H  100-100 best
longtext1

Similar Messages

  • Purchase Order Text in MM01, MM02 dependant on Planyt ??

    Hello,
    In SAP standard, the purchase order text in MM01, MM02, MM03 will not be depedant on the plan , Is there any ways or configuration that allows user to create this text dependant on the plan in MM01 ?
    Thanks

    Hello,
    I am afraid I must confirm you, that the System is working as designed.        
    Although the System asks for a plant when maintaining the Purchase Order  Text view, the text is stored at client level and not at plant level.          
    The basic data text, the inspection text, the internal comment, the material description and the sales text are as well maintained at client level. The only text that can be maintained at plant level is the material memo in the MRP 4 view.
    You can maintain plant specific texts in the purchasing info record.                                                                               
    Regards,
    Mauro

  • Bapi for Purchase Order Text

    Hello...
    which Bapi should I use for enter to a material Purchase Order Text(MM01 or MM02)??
    Thanks ......

    Hi,
    i am not shure about the bapi
    but this FM solves u r problem.
    K_PURCHASE_ORDERS_READ_TEXTS
    Thanks

  • The long text for purchase order text  field in mm03

    Hi,
         Please provide me long text for purchase order field.in mm03 the view purchase order text having the long text for purchase order.this is enter when ever your creating the material.but we have table and field name for that and also how to handle this long text.please provide me urgently.
    Thanks & Regards,
    Radhakrishna.

    Hi,
    A sample code for ur requirement.
    TABLES : ekko,   "Purchasing Document Header
             ekpo,   "Purchasing Document Item
             thead.  "SAPscript: Text Header
    DATA: t_theads LIKE stxh  OCCURS 0 WITH HEADER LINE.
    DATA: t_tlines LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: v_ebeln_ebelp(15) TYPE c.
    TYPES: BEGIN OF t_download,
           ebeln LIKE ekko-ebeln,
           ebelp LIKE ekpo-ebelp,
           tdobject LIKE stxh-tdobject,
           tdid LIKE stxh-tdid,
           tdspras LIKE stxh-tdspras,
           count(4) TYPE c,
           tdformat LIKE tline-tdformat,
           tdline LIKE tline-tdline,
         END OF t_download.
    TYPES: BEGIN OF t_header,
          line1(20) TYPE c,
          line2(20) TYPE c,
          line3(20) TYPE c,
          line4(10) TYPE c,
          line5(10) TYPE c,
          line6(10) TYPE c,
          line7(10) TYPE c,
          line8(10) TYPE c,
          END OF t_header.
    DATA: g_filename TYPE string.
    DATA: gt_header TYPE STANDARD TABLE OF t_header.
    DATA: gs_header TYPE t_header.
    DATA: gt_download TYPE STANDARD TABLE OF t_download.
    DATA: gs_download TYPE t_download,
        gt_tlines   LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: v_subrc TYPE subrc.
    DATA: v_nb_lines TYPE i.
    DATA: v_ok TYPE i.
    DATA: v_ko TYPE i.
    DATA: v_ow TYPE i.
    DATA:  p_fname TYPE string.
    DATA: g_append.
                              SELECTION SCREEN                          *
    SELECT-OPTIONS : s_ebeln  FOR ekko-ebeln.
    PARAMETERS:
       p_filedn(132) TYPE c OBLIGATORY,
       p_file(132) TYPE c OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filedn.
      PERFORM file_f4_get CHANGING p_filedn.
    START-OF-SELECTION.
    *Select all the purchase order corresponding to select criteria
      CLEAR t_theads. REFRESH t_theads.
      SELECT *
      FROM ekko
      WHERE ebeln IN s_ebeln.
    *Select all the text for P.O. header
        SELECT * FROM stxh
              APPENDING TABLE t_theads
              WHERE tdobject = 'EKKO'
              AND tdname      = ekko-ebeln.
    *Select Item of each P.O.
        SELECT *
        FROM ekpo
        WHERE ebeln = ekko-ebeln.
          CONCATENATE ekpo-ebeln ekpo-ebelp
          INTO v_ebeln_ebelp.
    *Select the text for P.O. item.
          SELECT * FROM stxh
                APPENDING TABLE t_theads
                WHERE tdobject = 'EKPO'
                  AND tdname   = v_ebeln_ebelp.
        ENDSELECT.              "select ekpo
      ENDSELECT.             "select ekko
      DESCRIBE TABLE t_theads LINES v_nb_lines.
      LOOP AT t_theads.
    Read the text from pool
        CLEAR thead.
        REFRESH t_tlines.
        CALL FUNCTION 'READ_TEXT'                               "#EC *
             EXPORTING
                  id                      = t_theads-tdid
                  language                = t_theads-tdspras
                  name                    = t_theads-tdname
                  object                  = t_theads-tdobject
             IMPORTING
                  header                  = thead
             TABLES
                  lines                   = t_tlines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        MOVE-CORRESPONDING thead TO gs_download.
        gs_download-ebeln = thead-tdname+0(10).
        IF thead-tdobject = 'EKPO'.
          gs_download-ebelp = thead-tdname+10(5).
        ENDIF.
        gs_download-count = 0.
        LOOP AT gt_tlines.
          gs_download-tdformat = gt_tlines-tdformat.
          gs_download-tdline = gt_tlines-tdline.
          gs_download-count = gs_download-count + 1.
          APPEND gs_download TO gt_download.
        ENDLOOP.
        CLEAR gs_download.
      ENDLOOP.
    END-OF-SELECTION.
    Hope this helps.
    please reward points if  useful.
    Regards
    rose

  • BDC  for purchase order

    Hi guys I have written the following program to upload the purchase order data by using BDC call transaction method, now I want to write whatever is in the message table, I mean the errors if there are any and the other required fields. So can you please help me in writing that :
    Thanks
    Rajeev Gupta
    *& Report  ZBDC_PURCHASEORDER                                          *
    REPORT  zbdc_purchaseorder                      .
    Definition of Structures *
    DATA: bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF itab OCCURS 0,
            vend_no(10),
            ord_typ(2),
            date(8),
            purch_org(4),
            purch_grp(3),
            plant(4),
            sloc(4),
            mat_grp(3),
            mat_no(18),
            quant(13),
            inc_term(3),
            inc_inf(28),
          END OF itab.
    DATA: itab2 LIKE itab OCCURS 0 WITH HEADER LINE.
    Definition of Variables *
    DATA: v_tabix LIKE syst-tabix,
          v_tabix2(2) TYPE n,
          v_ekorg LIKE ekko-ekorg,
          v_werks LIKE ekpo-werks,
          v_lifnr LIKE ekko-lifnr,
          v_bednr LIKE ekpo-bednr,
          v_index LIKE syst-index,
          l1 LIKE syst-tabix,
          c_tabix(2),
          v_mat_no(18),
          v_mat_quant(16).
    Definition of Constants *
    START-OF-SELECTION *
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM create_bdcdata.
    END-OF-SELECTION.
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename                = 'C:\Documents and Settings\ekansh\Desktop\purc_order.txt'
          filetype                = 'DAT'
        TABLES
          data_tab                = itab
        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
          gui_refuse_filetransfer = 8
          OTHERS                  = 9.
      itab2[] = itab[].
    *write : / itab-vend_no.
    ENDFORM.                    " get_data
    *&      Form  create_bdcdata
          text
    -->  p1        text
    <--  p2        text
    FORM create_bdcdata .
      DESCRIBE TABLE itab LINES l1.
      LOOP AT itab.
        v_tabix = syst-tabix.
        IF v_tabix = 1.
          MOVE v_tabix TO v_tabix2.
          PERFORM bdc_dynpro USING:
            'X'  'SAPMM06E'        '0100',
            ''   'BDC_OKCODE'      '/00',
            ''   'EKKO-LIFNR'      itab-vend_no,
            ''   'RM06E-BSART'     itab-ord_typ,
            ''   'RM06E-BEDAT'     itab-date,
            ''   'EKKO-EKORG'      itab-purch_org,
            ''   'EKKO-EKGRP'      itab-purch_grp,
            ''   'RM06E-WERKS'     itab-plant,
            ''   'RM06E-LGORT'     itab-sloc,
            ''   'RM06E-MATKL'     itab-mat_grp.
          PERFORM line_bdc_tab.
          v_lifnr = itab-vend_no.
          v_ekorg = itab-purch_org.
          v_werks = itab-plant.
         v_bednr = itab-bednr.
        ELSE.
          IF v_lifnr = itab-vend_no   AND
             v_ekorg = itab-purch_org AND
             v_werks = itab-plant.
           v_bednr = itab-bednr.
            v_tabix2 = v_tabix2 + 1.
            PERFORM line_bdc_tab.
          ELSE.
            PERFORM bdc_dynpro USING:
              'X'  'SAPMM06E'        '0100',
              ''   'BDC_OKCODE'      '/00',
              ''   'EKKO-LIFNR'      itab-vend_no,
              ''   'RM06E-BSART'     itab-ord_typ,
              ''   'RM06E-BEDAT'     itab-date,
              ''   'EKKO-EKORG'      itab-purch_org,
              ''   'EKKO-EKGRP'      itab-purch_grp,
              ''   'RM06E-WERKS'     itab-plant,
              ''   'RM06E-LGORT'     itab-sloc,
              ''   'RM06E-MATKL'     itab-mat_grp.
            CLEAR v_tabix2.
            v_tabix2 = v_tabix2 + 1.
            PERFORM line_bdc_tab.
            v_lifnr = itab-vend_no.
            v_ekorg = itab-purch_org.
            v_werks = itab-plant.
           v_bednr = itab-bednr.
          ENDIF.
        ENDIF.
        READ TABLE itab2 WITH KEY vend_no   = itab-vend_no
                                  purch_org = itab-purch_org
                                  plant     = itab-plant.
        IF v_tabix = 1.
          MOVE syst-tabix TO v_index.
        ENDIF.
        v_index = v_index + 1.
        READ TABLE itab2 INDEX v_index.
        IF itab2-vend_no   = itab-vend_no   AND
           itab2-purch_org = itab-purch_org AND
           itab2-plant     = itab-plant.
          IF l1 = v_tabix.
            PERFORM call_save.
            CALL TRANSACTION 'ME21' USING bdctab
            MODE 'A'
            UPDATE 'S'
            MESSAGES INTO messtab.
            CLEAR bdctab.
            REFRESH bdctab.
          ENDIF.
        ELSE.
          PERFORM call_save.
          CALL TRANSACTION 'ME21' USING bdctab
          MODE 'A'
          UPDATE 'S'
          MESSAGES INTO messtab.
          CLEAR bdctab.
          REFRESH bdctab.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " create_bdcdata
    *&      Form  bdc_dynpro
          text
         -->P_0120   text
         -->P_0121   text
         -->P_0122   text
    FORM bdc_dynpro  USING    p1
                              p2
                              p3.
      IF p1 = 'X'.
        bdctab-dynbegin = p1.
        bdctab-program = p2.
        bdctab-dynpro = p3.
      ELSE.
        bdctab-fnam = p2.
        bdctab-fval = p3.
      ENDIF.
      APPEND bdctab.
      CLEAR bdctab.
    ENDFORM.                    " bdc_dynpro
    *&      Form  line_bdc_tab
          text
    -->  p1        text
    <--  p2        text
    FORM line_bdc_tab .
      PERFORM bdc_dynpro USING:
        'X'  'SAPMM06E'        '0120',
        ''   'BDC_OKCODE'      '/00'.
      MOVE v_tabix2 TO c_tabix.
      CONCATENATE 'EKPO-EMATN(' c_tabix ')'  INTO v_mat_no.
      CONCATENATE 'EKPO-MENGE(' c_tabix ')'  INTO v_mat_quant.
      CONDENSE v_mat_no.
      CONDENSE v_mat_quant.
      PERFORM bdc_dynpro USING:
        '' v_mat_no    itab-mat_no,
        '' v_mat_quant itab-quant.
    ENDFORM.                    " line_bdc_tab
    *&      Form  call_save
          text
    -->  p1        text
    <--  p2        text
    FORM call_save .
      PERFORM bdc_dynpro USING:
       'X'  'SAPMM06E'        '0120',
        ''   'BDC_OKCODE'      '=BU',
        'X'    'SAPLSPO1'        '0300',
        ''     'BDC_OKCODE'      '=YES'.
    ENDFORM.                    " call_save

    <b>Overview</b>
    loop at itab.
    call transaction ......
    if sy-subrc <> '0'.
    perform error_message.
    endif.
    endloop.
    form error_message.
    call funtion 'format_message'. * to write the error message in to the screen
    endform.
    See the below example code for BDMSGCOLL Structure ...
    REPORT znit_bdc_assign
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    for programs doing a data transfer by creating a batch-input session
    and
    for programs doing a data transfer by CALL TRANSACTION USING
    *******Here SESSION = ' ' and CTU = 'X'
    DATA: ctumode LIKE ctu_params-dismode VALUE 'N' ,
    cupdate LIKE ctu_params-updmode VALUE 'L' ,
    e_group(12), "group name of error-session
    e_user(12) , "user for error-session
    e_keep VALUE 'X', "'X' = keep session if finished
    e_hdate LIKE sy-datum.
    DATA: smalllog VALUE ' ' ,
    nodata VALUE '/'.
    DATA: flag .
    DATA DECLARATION *
    TYPES: begin of t_result,
    matnr(18) , "TYPE RMMG1-MATNR
    maktx(40) , "TYPE makt-maktx
    bismt(18) , "TYPE mara-bismt
    brgew(13) , "TYPE mara-brgew
    gewei(3) , "TYPE mara-gewei
    message(250), "Message
    END OF t_result .
    DATA : right TYPE STANDARD TABLE OF t_result ,
    wrong TYPE STANDARD TABLE OF t_result ,
    wa_result TYPE t_result .
    data definition
    Batchinputdata of single transaction
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    messages of call transaction
    DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    error session opened (' ' or 'X')
    DATA: e_group_opened.
    message texts
    TABLES: t100.
    *INITIALIZATION
    INITIALIZATION.
    MOVE sy-uname TO e_user .
    Start new transaction according to parameters *
    FORM bdc_transaction USING tcode.
    DATA: l_mstring(480).
    DATA: l_subrc LIKE sy-subrc.
    batch input session
    REFRESH messtab.
    CALL TRANSACTION tcode USING bdcdata
    MODE ctumode
    UPDATE cupdate
    MESSAGES INTO messtab.
    l_subrc = sy-subrc.
    IF smalllog <> 'X'.
    WRITE: / 'CALL_TRANSACTION', "CH01
    tcode, "CH01
    'returncode:'(i05), "CH01
    l_subrc, "CH01
    'RECORD:', "CH01
    sy-index. "CH01
    LOOP AT messtab.
    SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
    AND arbgb = messtab-msgid
    AND msgnr = messtab-msgnr.
    IF sy-subrc = 0.
    l_mstring = t100-text.
    IF l_mstring CS '&1'.
    REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
    REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
    REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
    REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
    ELSE.
    REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
    REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
    REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
    REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
    ENDIF.
    CONDENSE l_mstring.
    WRITE: / messtab-msgtyp, l_mstring(250).
    IF messtab-msgtyp = 'S' . "If successfully uploaded CH01
    flag = '1' .
    ELSE .
    flag = '2' . "if not succesfully uploaded CH01
    ENDIF.
    MOVE l_mstring TO wa_result-message .
    ELSE.
    WRITE: / messtab.
    ENDIF.
    ENDLOOP.
    SKIP.
    Erzeugen fehlermappe ************************************************
    IF l_subrc <> 0 AND e_group <> space.
    IF e_group_opened = ' '.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    client = sy-mandt
    group = e_group
    user = e_user
    keep = e_keep
    holddate = e_hdate.
    e_group_opened = 'X'.
    ENDIF.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    tcode = tcode
    TABLES
    dynprotab = bdcdata.
    ENDIF.
    ENDIF.
    REFRESH bdcdata.
    ENDFORM.
    Start new screen *
    FORM bdc_dynpro USING program dynpro.
    CLEAR bdcdata.
    bdcdata-program = program.
    bdcdata-dynpro = dynpro.
    bdcdata-dynbegin = 'X'.
    APPEND bdcdata.
    ENDFORM.
    Insert field *
    FORM bdc_field USING fnam fval.
    IF fval <> nodata.
    CLEAR bdcdata.
    bdcdata-fnam = fnam.
    bdcdata-fval = fval.
    APPEND bdcdata.
    ENDIF.
    ENDFORM.
    *Structure of the internal table in which data has to be uploaded
    TYPES: BEGIN OF t_final,
    matnr(18) , "TYPE RMMG1-MATNR
    maktx(40) , "TYPE makt-maktx
    bismt(18) , "TYPE mara-bismt
    brgew(13) , "TYPE mara-brgew
    gewei(3) , "TYPE mara-gewei
    END OF t_final .
    DATA: answer , "return value in popup_to_comfirm
    count1 TYPE i , "no. of records not succusfully uploaded
    count2 TYPE i . "no. of records successfully uploaded
    DATA: i_final TYPE STANDARD TABLE OF t_final ,
    wa_final TYPE t_final .
    PARAMETERS: p_file LIKE rlgrap-filename OBLIGATORY.
    stores file name to be uploaded
    AT SELECTION SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    mask = ',.,..'
    MODE = ' '
    TITLE = ' '
    IMPORTING
    filename = p_file
    RC =
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    START OF SELECTION *
    START-OF-SELECTION.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    titlebar = 'Confirm Pop-UP'
    DIAGNOSE_OBJECT = ' '
    text_question = 'Would you like to proceed?'
    text_button_1 = 'Yes'(001)
    icon_button_1 = 'ICON_OKAY'
    text_button_2 = 'No'(002)
    icon_button_2 = 'ICON_CANCEL'
    default_button = '1'
    display_cancel_button = 'X'
    USERDEFINED_F1_HELP = ' '
    start_column = 25
    start_row = 6
    POPUP_TYPE =
    IMPORTING
    answer = answer
    TABLES
    PARAMETER =
    EXCEPTIONS
    text_not_found = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CHECK answer EQ '1'.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    filename = p_file
    filetype = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = i_final
    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
    OTHERS = 10
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT i_final INTO wa_final .
    PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RMMG1-MATNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RMMG1-MATNR'
    wa_final-matnr.
    MOVE wa_final-matnr TO wa_result-matnr .
    PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
    'X'.
    PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=BU'.
    PERFORM bdc_field USING 'MAKT-MAKTX'
    wa_final-maktx.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'MARA-BISMT'.
    PERFORM bdc_field USING 'MARA-BISMT'
    wa_final-bismt.
    PERFORM bdc_field USING 'MARA-BRGEW'
    wa_final-brgew.
    PERFORM bdc_field USING 'MARA-GEWEI'
    wa_final-gewei.
    MOVE wa_final-maktx TO wa_result-maktx .
    MOVE wa_final-bismt TO wa_result-bismt .
    MOVE wa_final-brgew TO wa_result-brgew .
    MOVE wa_final-gewei TO wa_result-gewei .
    PERFORM bdc_transaction USING 'MM02'.
    flag = '1' Record updated successfully
    flag = '2' Record not updated
    IF flag = '1' .
    APPEND wa_result TO right .
    count1 = count1 + 1 .
    ELSEIF flag = '2' .
    APPEND wa_result TO wrong .
    count2 = count2 + 1 .
    ENDIF .
    ENDLOOP.
    Report Generation
    WRITE : ' Success Item' .
    SKIP .
    WRITE : / ' Number of Success Items: ', count1 , ' Items.' .
    SKIP .
    WRITE: / 'Material Number ',
    19 'Material Name',
    59 'Old Mat. Name',
    77 'Gross Wt.',
    90 'Weight Unit',
    105 'Message' .
    WRITE: sy-uline .
    LOOP AT right INTO wa_result .
    WRITE: / wa_result-matnr ,
    19 wa_result-maktx ,
    59 wa_result-bismt ,
    77 wa_result-brgew ,
    90 wa_result-gewei ,
    105 wa_result-message .
    ENDLOOP .
    SKIP 2 .
    WRITE : /' Error Item' .
    SKIP .
    WRITE : / ' Number of Error Items: ', count2 , ' Items.' .
    SKIP .
    WRITE: / 'Material Number ',
    19 'Material Name',
    59 'Old Mat. Name',
    77 'Gross Wt.',
    90 'Weight Unit',
    105 'Message' .
    WRITE: sy-uline .
    LOOP AT wrong INTO wa_result .
    WRITE: / wa_result-matnr ,
    19 wa_result-maktx ,
    59 wa_result-bismt ,
    77 wa_result-brgew ,
    90 wa_result-gewei ,
    105 wa_result-message .
    ENDLOOP .
    Reward Points if it is helpful
    Rgds,
    Naren
    Message was edited by:
            Naren Someneni

  • Item text in Purchase Order getting updated with info. record Purchase Order Text

    Hello All,
    I am working in a roll out project and facing issue in text repeating twice for the line item in the Purchase Order for the new company code for which rollout is happening
    Issue:
    Item text in Purchase Order getting updated with info. record Purchase Order Text
    01) PO Text is maintained in the material master under "Purchase Order Text" tab
    02) The PO text that is maintained in material master is getting updated in the Purchase Info. Record
    03) When Purchase Order is created, the "Item Text" gets updated in the Purchase Order automatically only for the new company code for which rollout is happening. when printed, this results in the text getting duplicated twice
    03.1) this behavior is not observed in the Plants/ Company code that is already Live
    Configurations in the system:
    The copying rules for the "Texts for Purchase Orders" is
    Source Object = "Info Record", Source Text="Purchase Order Text", Fix="*"
    We have modified the Purchase Order form to print one of  the condition types maintained for calculating the tax. Other than this there is no change to the plants that are already live.
    I could not locate any "Purchase Organization" / "Company Code" / "Plant specific configuration.
    Am I missing any configuration or where can I look in what is causing this error.
    Request help from the experts in the forum.
    with Regards,
    Dhandapani R

    There is no company/purchasing/plant specific customizing for purchase order text.
    The customizing copying rules for the "Texts for Purchase Orders" affects all equally .
    If the text in the purchase order in ME23N is already filled different to other plants, then you either have a modification in place, or the texts are differently maintained in the referenced data (vendor, material, info record, contract)

  • How to Display  'purchase order text' in MM03 using report program

    Hi Friends,
    Can anybody suggest me how to display 'purchase order text' in MM03 using report program.
    'Purchase order text' tab displays purchase long text of particular material .
    I coded as:
          SET PARAMETER ID 'MXX' FIELD 'E'.
          SET PARAMETER ID 'MAT' FIELD k_final-matnr.
          SET PARAMETER ID 'WRK' FIELD k_final-werks.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    It displays Purchasing tab other than Purchase Order Text tab of MM03.
    Please suggest me how can i solve this.
    Is there any parameter id to set values for Purchase Order text tab

    >
    Madhu Mano Chitra wrote:
    > I want how to navigate to MM03 'Purchase Order text'  tab/ view using ABAP code.
    > could any suggest me
    You can call a transaction and pass it a BDC table that tells it where you want it to go.  You have to work out for yourself what to put into the BDC table.  The code below works for tcode CATSSHOW.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
       CLEAR bdcdata_wa.
        bdcdata_wa-program  = 'CATSSHOW'.
        bdcdata_wa-dynpro   = '1000'.
        bdcdata_wa-dynbegin = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'SO_STATU-LOW'.
        bdcdata_wa-fval = '20'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'ANDZEIT'.
        bdcdata_wa-fval = SPACE.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'PAST'.
        bdcdata_wa-fval = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        IF p_selscr = SPACE.
           CLEAR bdcdata_wa.
           bdcdata_wa-fnam = 'BDC_OKCODE'.
           bdcdata_wa-fval = '=ONLI'.
           APPEND bdcdata_wa TO bdcdata_tab.
        ENDIF.
        opt-dismode = 'E'.
        opt-defsize = 'X'.
    CALL TRANSACTION 'CAPP' USING bdcdata_tab OPTIONS FROM opt.

  • Upload of purchase order text in the material master

    Now we have information of Purchase order text for all the material.
    Is it possible to upload the Purchase order text using LSMW.
    Some friends were telling that LSMW is not possible for Purchase Order text.
    Can anyone suggest how I can upload this purchase order text for all 1000
    material using LSMW program.
    /if not LSMW is there any other method to upload it
    thanks in advance
    deepak.s.goura

    Dear Deepak,
    there is standard direct upload i believe
    go to lsmw
    Execute 1st option
    then inLSMW:Object Attribute screen
    in standard batch/ direct input
    firsr radio button
    select object 005
    and method 003
    Program name RSTXLITF.
    Then go by normal process i.e source field , field mapping...
    In this way u can also upload Text in the Material master.
    Rewards if helpful
    Regards
    Sanjay L

  • Sales text and  Purchase Order Text

    Hi,
    in what tables are stored Sales text and Purchase Order Text of the material master ?
    Best Regards

    Hi
    All long text is stored in STXH and STXL.
    Object is MATERIAL.
    Text-Id for basic data text is GRUN
    Text-Id for purchase order text is BEST
    For sales order text it is text object MVKE with text-id 0001
    Go to SE37 function builder. Enter READ_TEXT and do a single test ( F8 )
    Enter your parameters and execute. Example below.
    NAME is a comibation of materialnumber (00000000008000000)WITH leading zeros
    if numeric and sales org (1000) plus distribution channel (10)
    Import parameters - Value
    CLIENT - 010
    ID - 0001
    LANGUAGE - E
    NAME - 000000000008000000100010
    OBJECT - MVKE
    ARCHIVE_HANDLE - 0
    LOCAL_CAT
    Just for future reference with regards to getting text id's etc.
    eg: PO texts.
    --> Go into the material master PO text
    --> Double click into the required text.
    --> Click the "GO TO" menu option.
    --> click Header.
    and all the info you need is there.
    Thanks..

  • LSMW - Purchase Order Text in Material Master

    All MM Experts,
    I tired to create simple Batch Input Recording but the screen does not get recorded for Purchase Order text maintenance in mass for article master data. we are maintaining Purchase Order Text in article master data in basic data screen on additional data button under purchase order text tab.
    Any suggestion on creating LSMW for purchase order text.

    LSMW has a standard direct input for long texts, hence it is not necessary to do a recording.
    help.sap.com gives real good help for loading loading long texts with LSMW, further has this been discussed many many times here in MM  and in the data migration forum.
    try to search a bit, you dont really need more than the words you already have used on the subject to get a good variety of answers

  • View "Purchase Order Text" in Material Master

    Hi,
    I need replicated text of  view "Purchase Order Text" in ECC to Material Master in SRM.
    Or When We create a shopping cart in the way in which the text replicated "Purchase Order Text" from the the Material Master(ECC).
    Regards
    Angie

    For Purchase Order text in Material Master:
      use this code for Purchase Order text,
    DATA:  l_lsize(3)  TYPE n VALUE '132'.
      DATA:   lwa_tline     TYPE tline,
                lwa_thead     TYPE thead,
                lwa_valid     TYPE ty_input(flat file data),
                lwa_temp      TYPE ty_input.
      DATA: lit_tline TYPE STANDARD TABLE OF tline.
      lwa_thead-tdobject   = 'MATERIAL'.
      lwa_thead-tdid       = 'BEST'.
      lwa_thead-tdspras    = 'E'.
      lwa_thead-tdlinesize = l_lsize.
      LOOP AT pu_it_valid INTO lwa_valid.
        lwa_temp = lwa_valid.
        AT NEW matnr.
          CLEAR: lwa_thead-tdname,
                 lwa_tline-tdformat.
          lwa_thead-tdname     = lwa_temp-matnr.
        ENDAT.
        IF lwa_tline-tdformat IS INITIAL.
          lwa_tline-tdformat = ' \ '.
        ELSE.
          lwa_tline-tdformat = '='.
        ENDIF.
        CLEAR lwa_tline-tdline.
        lwa_tline-tdline = lwa_valid-text_line.
        APPEND lwa_tline TO lit_tline.
        AT END OF matnr.
          CALL FUNCTION 'SAVE_TEXT'
            EXPORTING
              client          = sy-mandt
              header          = lwa_thead
              insert          = c_x
              savemode_direct = c_x
            TABLES
              lines           = lit_tline
            EXCEPTIONS
              id              = 1
              language        = 2
              name            = 3
              object          = 4
              OTHERS          = 5.
          IF sy-subrc = 0.
            REFRESH lit_tline.
          ENDIF.
        ENDAT.
        CLEAR: lwa_temp,
               lwa_valid.
      ENDLOOP.

  • Update: Purchase order text

    Hi
    We would like to use the current long text of a material and update the purchase order text programatically with the same data.
    How can i create the P.O. text without using BDC updates?

    What text do you want to load ( I mean header text or item text )
    see the example to save text
    report ZMPPC016
           no standard page heading
           line-size 120.
    Constants
    constants : c_r type c value 'R', " PLNTY Value
                C_X TYPE C VALUE 'X', " Value for dynbegin.
                c_tcode like tstc-tcode value 'CA22', " Transaction code
                c_mode(1) type c value 'A', " BDC Mode
                c_tdformat type tline-tdformat value '*',"Tag column
                c_tdid type thead-tdid value 'PLPO', " Text ID
                c_tdform type thead-tdform value 'SYSTEM'." Form name
    Variables
    data : v_date like sy-datum, " date
           v_date1(4) type c,
           v_date2(2) type c,
           v_date3(2) type c,
           TNAME LIKE THEAD-TDNAME,
           v_mandt(3) type c,
           v_matnr(18) type c,
           flag type c.
    Internal table for file
    data : begin of t_file occurs 0,
           matnr(18) type c, " Material Number
           werks(4) type c,  " Plant
           vornr(4) type c,  " Operation Number
           tseq(3) type n,   " Line number in the long text
           text1(70) type c, " Long text
           plnal(2) type n,  " Group counter
           end of t_file.
    data : begin of t_text occurs 0,
           matnr(18) type c, " Material Number
           werks(4) type c,  " Plant
           plnal(2) type n,  " Group counter
           vornr(4) type c,  " Operation Number
           tseq(3) type n,   " Line number in the long text
           text1(70) type c, " Long text
           end of t_text.
    Internal table for MAPl
    data : begin of t_mapl occurs 0,
           plnnr like mapl-plnnr,
           end of t_mapl.
      Internal Table for PLAS and PLPO Table
    data : begin of t_plpo occurs 0,
           mandt like plpo-mandt,
           plnty like plpo-plnty,
           plnnr like plpo-plnnr,
           plnkn like plpo-plnkn,
           zaehl like plpo-zaehl,
           end of t_plpo.
    data t_long like tline occurs 0 with header line.
    Work area for t_text Internal table
    data : wa_text like t_text.
    data:  t_header like thead.         " long text
    Internal table for BDCDATA Structure
    data : begin of itab_bdc_tab occurs 0.
            include structure bdcdata.
    data : end of itab_bdc_tab.
    Selection-screen
    selection-screen : begin of block blk with frame .
    parameter : P_file like rlgrap-filename obligatory.
    selection-screen : end of block blk.
    initialization.
      p_file = 'C:\My Documents\InputFile.txt'.
    at selection-screen on value-request for p_file.
    F4 value for file
      perform file_get.
    start-of-selection.
    Get file data into Internal Table.
      perform get_data.
      sort t_text by matnr werks  vornr  plnal tseq.
    Save the long text into CA22 Transaction
      perform load_data.
    top-of-page.
      CALL FUNCTION 'Z_HEADER'
    EXPORTING
       FLEX_TEXT1       =
       FLEX_TEXT2       =
       FLEX_TEXT3       =
      skip 1.
    *&      Form  file_get
          F4 Value for file
    FORM file_get.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_PATH         = 'C:\Temp\'
                MASK             = ',.,..'
                MODE             = 'O'
                TITLE            = 'Select File'(007)
           IMPORTING
                FILENAME         = P_file
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    ENDFORM.                    " file_get
    *&      Form  get_data
          Get file data into Internal Table.
    FORM get_data.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                FILENAME                = p_file
                FILETYPE                = 'DAT'
           TABLES
                DATA_TAB                = t_file
           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
                OTHERS                  = 10.
      if sy-subrc eq 0.
        sort t_file by matnr werks plnal vornr tseq.
        delete t_file where matnr = ''.
        loop at t_file.
       Get the material number from tables ZMSMI_FERR_RAW,
       ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW
          perform get_matnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
               EXPORTING
                    INPUT  = t_file-vornr
               IMPORTING
                    OUTPUT = t_file-vornr.
          move : t_file-matnr to t_text-matnr,
                 t_file-werks to t_text-werks,
                 t_file-vornr to t_text-vornr,
                 t_file-tseq  to t_text-tseq,
                 t_file-text1 to t_text-text1,
                 t_file-plnal to t_text-plnal.
          append t_text.
          clear t_text.
        endloop.
      else.
        WRITE: / 'Error reading input file'.
        stop.
      endif.
    ENDFORM.                    " get_data
    *&      Form  call_bdc
          BDC Script for CA22 Transaction
    FORM call_bdc.
    Screen 1010
      perform bdc_screen using  'SAPLCPDI'     '1010'.
      perform bdc_field  using  'BDC_OKCODE'   '=VOUE'.
      perform bdc_field  using  'RC27M-MATNR'   SPACE.
      perform bdc_field  using  'RC27M-WERKS'   SPACE.
      perform bdc_field  using  'RC271-VBELN'   SPACE.
      perform bdc_field  using  'RC271-POSNR'   SPACE.
      perform bdc_field  using  'RC271-PLNNR'   T_PLPO-PLNNR.
      perform bdc_field  using  'RC271-AENNR'   SPACE.
      clear :  v_date,
               v_date1,
               v_date2,
               v_date3.
      v_date1 = sy-datum+0(4).
      v_date2 = sy-datum+4(2).
      v_date3 = sy-datum+6(2).
      concatenate v_date2 v_date3 v_date1 into v_date.
      perform bdc_field  using  'RC271-STTAG'  v_date .
      perform bdc_field  using  'RC271-REVLV'   SPACE.
      perform bdc_field  using  'RC271-WERKS'   SPACE.
      perform bdc_field  using  'RC271-PLNAL'   WA_TEXT-PLNAL.
      perform bdc_field  using  'RC271-STATU'   SPACE.
      perform bdc_field  using  'RC271-VAGRP'   SPACE.
      perform bdc_field  using  'RC271-PROFIDNETZ'   SPACE.
    Screen 5400
      perform bdc_screen using  'SAPLCPDI'     '5400'.
      perform bdc_field  using  'BDC_OKCODE'   '=OSEA'.
    Screen 1010
      perform bdc_screen using  'SAPLCP02'     '1010'.
      perform bdc_field  using  'BDC_OKCODE'   '=ENT1'.
      perform bdc_field  using  'RC27H-VORNR'  WA_TEXT-VORNR.
    Screen 5400
      perform bdc_screen using  'SAPLCPDI'     '5400'.
      perform bdc_field  using  'BDC_OKCODE'   '=LTXT'.
      perform bdc_field  using  'RC27X-FLG_SEL(01)'  C_X.
    Screen 1100
      perform bdc_screen using  'SAPLSTXX'     '1100'.
      perform bdc_field  using  'BDC_OKCODE'   '=XEIN'.
    Screen 0999
      perform bdc_screen using  'SAPLWB_CUSTOMIZING'     '0999'.
      perform bdc_field  using  'BDC_OKCODE'   '=CONT'.
      PERFORM BDC_FIELD  USING  'RSEUMOD-GRA_EDITOR' SPACE.
    Screen 1100
      perform bdc_screen using  'SAPLSTXX'     '1100'.
      perform bdc_field  using  'BDC_CURSOR'   'RSTXT-TXPARGRAPH'.
      perform bdc_field  using  'BDC_OKCODE'   '=TXBA'.
      perform bdc_field  using  'RSTXT-TXPARGRAPH(03)'   '*'.
      perform bdc_field  using  'RSTXT-TXLINE(03)'
    Screen 5400
      perform bdc_screen using  'SAPLCPDI'     '5400'.
      perform bdc_field  using  'BDC_OKCODE'   '=BU'.
      call transaction c_tcode
           using itab_bdc_tab mode 'N'
           update 'S'.
      refresh itab_bdc_tab.
      if sy-subrc eq 0 and sy-msgty ne 'E'.
        v_mandt = t_plpo-mandt.
        CONCATENATE v_mandt
                    t_plpo-plnty
                    t_plpo-plnnr
                    t_plpo-plnkn
                    t_plpo-zaehl into tname.
        commit work.
        CALL FUNCTION 'DELETE_TEXT'
          EXPORTING
          CLIENT                  = SY-MANDT
            ID                    = c_tdid
            LANGUAGE              = 'E'
            NAME                  =  TNAME
            OBJECT                = 'ROUTING'
            SAVEMODE_DIRECT       = 'X'
         TEXTMEMORY_ONLY       = ' '
         LOCAL_CAT             = ' '
         EXCEPTIONS
           NOT_FOUND             = 1
           OTHERS                = 2
        if sy-subrc ne 0.
          write:/3  wa_text-matnr,24 wa_text-werks,
                    30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                    60 ' -',
                    67 'Error Deleting Existing Long Text'.
        endif.
      else.
        write:/3  wa_text-matnr,24 wa_text-werks,
                       30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                       60 ' -',
                       67 'Error Executing BDC'.
      endif.
    ENDFORM.                    " call_bdc
    *&      Form  bdc_screen
          BDC Script for Screen fields
         -->P_PROG   Program name
         -->P_SCRN   Screen Number
    FORM bdc_screen USING    p_prog
                             p_scrn.
      clear itab_bdc_tab.
      itab_bdc_tab-program = p_prog.
      itab_bdc_tab-dynpro = p_scrn.
      itab_bdc_tab-dynbegin = c_x.
      append itab_bdc_tab.
    ENDFORM.                    " bdc_screen
    *&      Form  bdc_field
          BDC Script for Screen fileds
         -->P_NAM   Field name
         -->P_VAL   Field value
    FORM bdc_field USING    p_nam
                            p_val.
      clear itab_bdc_tab.
      itab_bdc_tab-fnam = p_nam.
      itab_bdc_tab-fval = p_val.
      append itab_bdc_tab.
    ENDFORM.                    " bdc_screen
    *&      Form  load_data
          Save the long text into CA22 Transaction
    FORM load_data.
      loop at t_text.
        move t_text to wa_text.
        at new vornr.
    Read the data in MAPL Table
          select single plnnr from mapl into t_mapl-plnnr
                                 where matnr  = wa_text-matnr
                                 and   werks  = wa_text-werks
                                 and   plnty  = c_r
                                 and   loekz  = space.
          if sy-subrc eq 0.
    Read the data from PLAS and PLPO Table
            select SINGLE  a~mandt
                    a~plnty
                    a~plnnr
                    a~plnkn
                    a~zaehl into  t_plpo
                   from plpo as a inner join plas as b on aplnty = bplnty
                                                      and aplnnr = bplnnr
                                                      and aplnkn = bplnkn
                    where b~plnty = c_r
                    and   b~plnnr = t_mapl-plnnr
                    and   b~plnal = wa_text-plnal
                    and   b~loekz = space
                    and   a~vornr = wa_text-vornr
                    and   a~loekz = space.
            if sy-subrc eq 0.
              perform call_bdc.
            else.
            flag = 'X'.
              write:/3  wa_text-matnr,24 wa_text-werks,
                     30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                     60 ' -',
                     67 'Matching routing group\Operation not found'.
              continue.
            endif.
          else.
            flag = 'X'.
            write:/3 wa_text-matnr,24 wa_text-werks,
                     40 ' -',
                     45 'Material Does not Exists or Material',
                     82 'not Available in MAPL Table'.
            continue.
          endif.
        endat.
        if flag ne 'X'.
          t_long-tdline = wa_text-text1.
          t_long-tdformat = c_tdformat.
          append t_long.
        endif.
        at end of vornr.
          if flag ne 'X'.
            v_mandt = t_plpo-mandt.
            CONCATENATE v_mandt
                      t_plpo-plnty
                      t_plpo-plnnr
                      t_plpo-plnkn
                      t_plpo-zaehl into tname.
            T_HEADer-TDOBJECT = 'ROUTING'.
            t_HEADer-TDNAME   = tname.
            T_HEADer-TDID     = c_tdid.
            t_header-tdform   = c_tdform.
            T_HEADer-TDSPRAS  = 'E'.
    Save the text
            CALL FUNCTION 'SAVE_TEXT'
              EXPORTING
                CLIENT                = SY-MANDT
                HEADER                = t_header
                SAVEMODE_DIRECT       = 'X'
         OWNER_SPECIFIED       = ' '
         LOCAL_CAT             = ' '
       IMPORTING
         FUNCTION              =
         NEWHEADER             =
              TABLES
                LINES                 = t_long
             EXCEPTIONS
               ID                    = 1
               LANGUAGE              = 2
               NAME                  = 3
               OBJECT                = 4
               OTHERS                = 5
            if sy-subrc eq 0.
              CALL FUNCTION 'COMMIT_TEXT'
                   EXPORTING
                        OBJECT   = t_header-TDOBJECT
                        NAME     = t_header-TDNAME
                        ID       = t_header-TDID
                        LANGUAGE = t_header-TDSPRAS.
              write:/3   wa_text-matnr,24 wa_text-werks,
                         30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                         60 ' -',
                         67 'Long Text Loaded Successfully'.
            else.
              write:/3   wa_text-matnr,24 wa_text-werks,
                         30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                         60 ' -',
                         67 'Error Uploading Long Text'.
            endif.
            refresh t_long.
            else.
            write:/3 wa_text-matnr, 24 wa_text-werks,
                   45 'Long text not uploaded'.
            clear flag.
           endif.
          endat.
        endloop.
      ENDFORM.                    " load_data
    *&      Form  get_matnr
          Get the material number from tables ZMSMI_FERR_RAW,
    FORM get_matnr.
      clear v_matnr.
      case t_file-werks.
        when '0101'.
          select single cmatnr from zmsmi_simp_raw
                 into v_matnr  where matnr = t_file-matnr.
         if sy-subrc eq 0.
          if not v_matnr is initial.
            clear t_file-matnr.
            t_file-matnr = v_matnr.
          endif.
        when '0103'.
          select single cmatnr from zmsmi_ferr_raw
                 into v_matnr  where matnr = t_file-matnr.
         if sy-subrc eq 0.
          if not v_matnr is initial.
            clear t_file-matnr.
            t_file-matnr = v_matnr.
          endif.
        when '0102' or '0110' or '0111' or '0112' or '0113'
             or '0114' or '0115' or '0116' or '0117'.
          select single cmatnr from zmsmi_snap_raw
                 into v_matnr  where matnr = t_file-matnr.
         if sy-subrc eq 0.
          if not v_matnr is initial.
            clear t_file-matnr.
            t_file-matnr = v_matnr.
          endif.
      endcase.
    ENDFORM.                    " get_matnr
    Reward Points if it is helpful
    Thanks
    Seshu

  • Purchase Order text field update in Material Mater

    Hi experts,
    Is't possible that we can give authorization to update ONLY Purchase Order text field
    under the Purchase Order text view in MM?
    But while giving authorization, I could only see "Maintenance statuses of Material" I could only see status code "E" in general for Purchasing view.
    Please advise if this is possible to control to give authorization to update only this Purchase order text view in MM.
    Regards,
    P

    Hi
    Please try this way
    Authorization object: M_MATE_STA
    Define the fields this way
    Fields     Possible values                                   Meaning
    ACTVT      01                                                   User may create data.
                     02                                                  User may change data.
                     03                                                  User may display data.
                     06                                                   User may flag data for  deletion.
                     08                                                   User may display change   documents.
    STATM                                                             Here, you specify the
                                                                            maintenance status for which
                                                                             the user is authorized.
    regards
    sunny

  • Uploading sales text and Purchase order text for material master

    Hi,
      I have created, material master with LSMW  byt not updated SALES TEXT and Purchase order text with LSMW  now i want to uplaod the sales and po text for material master can you give some link or ref. code to upload the text i have near 1000 items for which i want to uplaod text  when i have done the recording with SHDB  i have not found filed in recording.
    regards,
      zafar

    Hi,
    I have made the code in se38
    as below but still it is not working
    REPORT  ZTEST_TEXT.
      data: headerl like thead occurs 0 with header line.
      data itab3 like tline occurs 0 with header line.
    headerl-tdobject = 'MATERIAL'.
    headerl-tdname = '00000000000LSMW123'.          "(Material : 000000000300000560, Sorg : 0001, Dist channel: 01)
    headerl-tdid  = 'BEST'.
    headerl-tdspras = 'E'.
    append headerl.
    move '*' to itab3-tdformat.
    move 'Testing PO text' to itab3-tdline.
    append itab3.
    call function 'SAVE_TEXT'
      exporting
        header                = headerl
      insert                = ' '
       savemode_direct       = ' '
      tables
        lines                 = itab3
    exceptions
       id                    = 1
       language              = 2
       name                  = 3
       object                = 4
       others                = 5.
       IF SY-SUBRC = 0.
         CALL FUNCTION 'COMMIT_TEXT'
           EXPORTING
                OBJECT   = headerl-tdobject
                NAME     = headerl-tdname.
       ENDIF.
       break-point.
    regards,
    zafar

  • LSMW  MM02 -  CHANGE PURCHASE ORDER TEXT

    I need to change the purchase order text  in mm02  using the LSMW. 
    Can you help me?

    LSMW has a standard direct input for long texts, hence it is not necessary to do a recording.
    help.sap.com gives real good help for loading loading long texts with LSMW, further has this been discussed many many times here in MM  and in the data migration forum.
    try to search a bit, you dont really need more than the words you already have used on the subject to get a good variety of answers

Maybe you are looking for

  • Missing Tools in Bridge CS4

    Can anyone tell me why I don't have the Photoshop or Illustrator tools in my Bridge Tools menu?  The last command listed is Cache. No Photoshop > Batch... ; Image Processor... ; etc.  What did I fail to install or ...?  Thanks for your help.

  • Purchasing apps

    It feels like something has changed recently in iTunes with iPhone.  I wonder if it has something to do with the pending release of iOS 5 and / or iCloud.  Having had the iPhone for a while now, I'm kind of saturated in the apps I want (I have about

  • Can't get the Navigation Bar re-opened

    I have accidentally closed or hidden the most important Bar: The one with the Back and Forth buttons. File View etc Have been trying everything....please call me if possible to talk me through this........xxx-xxx-xxxx [email protected]

  • Creating system in portal for the backend SRM

    Dear All, We are in the process of setting up a system  in portal for the backend SRM system I have tried to create system in System admin--> System configuration --.>System landscape For SAP Web AS Connection , the parameters maintained are: Hostnam

  • Why does AS3 error when opening AS2 sharedObject

    I have a .sol file that can be opened using AS2 but when AS3 opens it i get RangeError: Error #2006: The supplied index is out of bounds. at flash.net::SharedObject$/getLocal() I have tried the SharedObject.defaultObjectEncoding = ObjectEncoding.AMF0