Reg: Header text updation in VL02n transaction

Hi Experts,
i have one requirement in return delivery.
I am executing one customizing trasaction, and it displays screen.
In that screen i am editing the fileds and when i click on the save button i need to update in delivery transaction header texts (VL02n transaction goto header texts).

Hi,
Use the SAVE-TEXT FM as below.
  CALL FUNCTION 'SAVE_TEXT'
       EXPORTING
            HEADER    = LS_THEAD
       IMPORTING
            NEWHEADER = LS_THEAD
       TABLES
            LINES     = TLINETAB
       EXCEPTIONS
            ID        = 1
            LANGUAGE  = 2
            NAME      = 3
            OBJECT    = 4
            OTHERS    = 5.
  IF SY-SUBRC = 0.
Where LS_THEAD, CONTAINS:
                                        TDOBJECT                                             VBBK
                                        TDNAME                                             00999999(Your delivery no)
                                        TDID                                                         Z950
                                        TDSPRAS                                             E.
You can find this details, when you go to the transaction(VL02N) and enter some text and do the debug on  SAVE_TEXT FM, then get the values it uses to save the text, use the same in you program.
Hope this helps,
Cheers,
Srini.

Similar Messages

  • How 'Assignment' is updated using VL02N transaction ?

    Hi Experts,
    I want to know how and where in the program SAPMV50A, the 'assignment' field is updated when  I post a GI document using VL02N transaction.
    The filed for assignment is ZUONR of BSEG table. I want to know how the ZUONR field is updated while VL02N transaction is used to post a GI document.
    Please help me asap.
    Thanks & regards
    Sanglap Ghosh
    Edited by: sanglap_ghosh581 on Mar 10, 2010 10:18 AM
    Edited by: sanglap_ghosh581 on Mar 10, 2010 10:20 AM

    Did you find a solution for this? I have the same requirement.

  • Reg. Validation on Header text in Purchase Order Transaction

    Hi All,
       As per the requirement we need to validate on header text in PO transaction.
    Can any one let me know if there is way to do using user exit or configuration.
    Please kindly help me. This is urgent.
    Regards
    Anil Kumar K

    Hi
    You can check either user exit or BADI implementations.
    I´d recommend implementing  BADI ME_PROCESS_PO_CUST on the method PROCESS_HEADER.
    Dont forget to reward if helpful.
    Bye
    Gabriel P.

  • Header text updation at the time of IP10

    When the user converts the maintanence plan for PRS at the time of IP10 the user wants to know the below
    1. Need to get the prs number in the footer so that immediately he can not it down
    2. They have some specific text to be updated in the PRS where while converting that in to po the same will get reflected in the PO print previe
    at the time of creation of PR itself the same text need to get updated in PR header text and as well as in the item level

    PRAVANESH TN,
    You post isn't clear...
    I'm assuming that a PRS is a purchase requisition??
    And where is this text coming from?
    PeteA

  • Order header text problems when using transaction EC20 (front office)

    Hello all,
    I am to debug a problem. I use transaction EC20 to capture information about connection objects and devices followed by creation of a work order. At one point in time I am presented with a screen where I can enter order header text (looks like SAPscript lines of text). However, even if I enter 3, 4 or more lines, only the first line of the text is captured.
    I then use transaction IW33 to look at the order and will see the first line only. Any idea if this is a SAP bug, or something else. If SAP bug, then any OSS note or remedy?
    Your help is greatly appreciated.
    AG

    Hi,
    the screen you said look like a script editor screen is actually for trext maintainence...you can find such screen in se 38 documentation tab.this screen still exists because 3.1 and the versions before were using this screen for editor.
    now when you say it captures only 1 line just go and find out the length of that particular field.If.
    Please let me know if the problem still exists
    Thanks
    vivekanand

  • Header text update problem for BAPI_CONTRACT_CREATE

    Hi,
    We are in the process of converting the BDC for Contract creation ME31 into BAPI.
    For the purpose we had identified the BAPI,
    BAPI_CONTRACT_CREATE.
    The bapi works fine , except it doest not update the Header Text.
    The parameters passed for header text are
    Text ID : K01.
    Text Form : *
    Text line : ( Header text content).
    We are working on ECC6.0.
    Pls advice me how to proceed.
    Regards
    harish

    Hi Harish,
      Can you please give me a brief idea on how you are using this BAPI?
    1) What would be the format of excel file?
    2) Does the BAPI work for both create and update ?
    3) Any know limitation ?
    4) Any documentation you have or you can point me to on the web regarding this BAPI?
    Thanks
    AK

  • Header text update in creation of PO

    Hi All,
    Our reqd is to change the header text while creation of PO.
    I am using the badi BBP_CREATE_BE_PO_NEW.
    Could some one please tell me how to use this badi for populating the header text in PO.
    Regards
    Bidyut

    thanks

  • Header Text Update(Sales Order) in - MV45AFZZ - USEREXIT_SAVE_DOCUMENT_PREP

    Hi,
    I am creating a sales order from third party systme and do saom validation in EXIT - MV45AFZZ(the exit called before saving Sales Order). Based on my validation I am appending the header text incase if it is available already else I key in some text incase if we don't have a text.
    Since we don't have the OBJECT NAME (Sales order number) at this point I am not able to do this. Can you please help me to resolve this.
    Thanks in Advance... <<Text removed>>
    Regards
    Mohan
    Edited by: Matt on Apr 9, 2009 9:58 AM - Do not offer points

    Write the same logic 'after sales order number has been generated', it will be done in USEREXIT_SAVE_DOCUMENT  user exit.

  • 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

  • BAPI_SALESORDER_CHANGE for Ship to party header text updation.

    hello gurus,
    My requirement is to update SHIP to PARTY text at header level using BAPI_SALESORDER_CHANGE.
    exisiting logic is updating same through below parameter to BAPI for line item with pop up to change the SHIP to party text..
    partnerchanges   = tb_partnersc
    But to the same parameter if i am passing header record also long with Line item , header data is not updated but line item is updated,
    ITM_NUMBER = '000000'.  "header line item = 000000
    headerx-update = X is also passed.
    Please help me .
    regards,
    Jayant.

    pradeep,
    I still see this thread as open.  Please review this code as a more clear solution.
    REPORT  ZR_SANDBOX_PROG.
    data: vb like BAPIVBELN-VBELN.
    data: cl like BAPISDH1X.
    data: rt type table of BAPIRET2 with header line.
    data: rt2 type BAPIRET2.
    data: pt type table of BAPIPARNRC with header line.
    vb = '0000153147'.     " your sales order here
    cl-updateflag = 'U'.
    pt-DOCUMENT = vb.
    pt-ITM_NUMBER = '000000'.  "header line item = 000000
    pt-UPDATEFLAG = 'U'.
    pt-PARTN_ROLE = 'WE'.
    pt-P_NUMB_OLD = '0003300744'.
    pt-P_NUMB_NEW = '0003300074'.
    append pt.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = vb
        ORDER_HEADER_INX            = cl
      TABLES
        RETURN                      = rt
        PARTNERCHANGES              = pt.
    loop at rt.
      write: / rt-MESSAGE.
    endloop.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
       RETURN        = rt2.
    Reward points accordingly.

  • Function module for updating amount in VL02N transaction

    Hi All,
         I have a requirement , to update Amount in Conditions tab of the header (VL02N transaction) beside parcel tracking .
    I have to update condition type 'ZF01' & the amount here ..
    I will get  file from a third party system to update the amount & tracking no..
    i have successfully updated tracking no.. by using FM XSI_TRACKING_DATA_SAVE.., unable to find FM for amount & condition type update..
    I have tried searching in FM 'WS_DELIVERY_UPDATE', didnt find anything related.
    If anyone has done any similar update in VL02N transaction, can you please suggest me appropriate FM?
    Regards
    Chaithanya

    fm SPELL_AMOUNT

  • How to restrict header text changes in sales order level

    Dear Experts,
    how to restrict header text changes in sales order level change mode
    thanks

    Hello Chandu,
    how to restrict header text changes in sales order level change mode
    In order to restrict changes to Sales Order Header Text, the appropriate User Exit would be USEREXIT_MOVE_FIELD_TO_TVCOM_H. With the help of ABAPer, you can include the simple logic on the basis of Header Text type such that whenever any changes are incurred on the Sales Order header text, updates would be prevented.
    Please try out this approach and let us know your latest observation on this issue.
    Regards,
    Sarthak

  • Populate header text of ME22N

    Hi All,
    I wan tto populate the header text field of the transaction code ME22N. I want to populate the header text by the requester's email-id. Th erequirementment is like all the POs has been created but now the email-ids has to be populated. Is there any way to populate all the email-ids we have in the header text field of the Tcode except populating them One by One ?
    Many Thanks...

    Hi,
    You can create a BDC for that.
    That would be simplest way to do it.
    Regards,
    Raj

  • Uploading texts in vl02n transaction

    Hi all,
    can anyone tell me how to upload texts(in vlo2n transaction->goto->header->texts)
    in vl02n transaction. plz send me some coding for this scenario.
    Thanks,
    Satish.

    This is Routing long text upload - CA22 Transaction example code :
    Report     : ZMPPC016
    Type       : Data upload
    Author     : Seshu Maramreddy
    Date       : 05/27/2005
    Transport  : DV3K920205
    Transaction: ??
    Description: This ABAP/4 Program Upload the long text into CA22
                 Transaction It accepts tab-delimited spreadsheet input
                 and it will run Call Transaction
    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 useful
    Thanks
    Seshu

  • Update Sale Order Header Text through Enhancement

    Hi Experts,
             I Have a requirement to update the sale order Header Text , when the sale order is opened in VA02 and saved.
    Here in I tried using edit_text, it updates sale order header text  directly in DB during run time even before the save action is completed.
    But I need to just fill the header text and that has to be saved during the save action only.
    I tried coding the same in the user exit (userexit_save_document) but this user exit gets triggered only when there is some changes made to the document when opened in VA02 & Saved.
    Is there any  user exist to pass sale Order Header text and save when save button is clicked irrespective of the document been changed or not.
    Thanks in advance
    Sathish

    Hi Brad Bohn,
        My actual requirement is to trigger an Idoc when the user goes to VA02 transaction and clicks save.
    IDoc gets triggered only when there is some changes to that document, that is through NAST table entry based on the output configurations in NACE transaction.
    Now that the user wants to trigger an IDoc even if there is no change (ie. to reprocess the IDoc) when he just opens a sale order in VA02 and click save.
    It is not possible to trigger an IDoc through configurations when there is no actual change in VA02 and saved.
    So it has to be forcefully sent by making some additions to the Order through coding, so I choose that Text box to fill some additional data and save .
    Kindly Let me Know any thing could be done for this scenario.
    Thanks in advance
    Sathish

Maybe you are looking for