Reg:Updating NAST Table

Hi Gurus,
In my requirement i want to set  the data base field VSTAT as 1 in NAST table when the order is processed. I'm using UPDATE statement to update the database field but it does not work. i write the code like this
update nast set vstat = 1
           where kappl     = 'EF' and
                     objky  = '5500000002'  and
                    kschl   = 'LEFT'.
but it doesn't work fine sy-subrc set to 4. Is there any way to set the value of vstat as 1. Please help me.

same here, you need to write your issue clearly. Why are you trying to update NAST. it contains the output from the transaction, why not letting it processed instead of doing something stupid bu updating in in the code. if you dont weant output to be processed remove the condition record.
You would help yourself if you write the problem yiu are facing more clearly.  eg you are writing the code but where? which program ? user exit?  how  can one imagin what your issue is

Similar Messages

  • FM to update NAST table

    hi ,
    Due to my specific requirements , I want to update Procesing status field in NAST table.
    Can u plz tell me da name of the FM to update that / any other way

    refer same thread...
    Re: Update NAST

  • UPDATE NAST

    Hi all, i'm using this coding to update nast table for Purchase Order .This coding is not working.
    please help me to solve this problem.
    Your help is greatly appreciated.
    tables nast.
    nast-MANDT            =   sy-mandt.
    nast-KAPPL            =   'EF'.
    nast-OBJKY            =   '4100000477'.
    nast-KSCHL            =   'NEU'.
    nast-SPRAS            =   sy-langu.
    nast-PARNR            =   '0000100165'.
    nast-PARVW            =   'LF'.
    nast-ERDAT            =   sy-datum.
    nast-ERUHR            =   sy-uzeit.
    nast-NACHA            =   '1'.
    nast-ANZAL            =   '0'.
    nast-VSZTP            =   '1'.
    nast-MANUE            =   'X'.
    nast-USNAM            =   sy-UNAME.
    nast-VSTAT            =   '0'.
    nast-LDEST            =   'HOIT'.
    nast-TDID             =   'BEWG'.
    nast-TDSPRAS          =   sy-langu.
    nast-NAUTO            =   'X'.
    nast-TDRECEIVER       =   sy-UNAME.
    nast-TDCOVTITLE       =   'New Purchase Order Printout'.
    CALL FUNCTION 'NAST_SAVE_OBJECT'
      EXPORTING
        pi_nast              = nast
       PI_LINK_OBJECT       = 'X'
       PI_PROCESSING        = 'X'
    EXCEPTIONS
       NOT_SAVED            = 1
       OTHERS               = 2
    IF sy-subrc <> 0.
      write: / 'NOT SAVED'.
    ELSE.
      write: / 'SAVED'.
    ENDIF.
      IF sy-subrc = 0.
        COMMIT WORK.
        write / 'TABLE "NAST" WAS UPDATED'.
      else.
        rollback work.
        write / 'TABLE "NAST" WAS NOT UPDATED'.
      endif.

    Hi,
    The following piece of coding should be changed as
    IF sy-subrc <> 0.
    write: / 'NOT SAVED'.
    ELSE.
    write: / 'SAVED'.
    ENDIF.
    IF sy-subrc = 0.
    COMMIT WORK.
    write / 'TABLE "NAST" WAS UPDATED'.
    else.
    rollback work.
    write / 'TABLE "NAST" WAS NOT UPDATED'.
    endif.
    <u>Changed code:</u>
    IF sy-subrc <> 0.
    rollback work.
    write / 'TABLE "NAST" WAS NOT UPDATED'.
    ELSE.
    COMMIT WORK.
    write / 'TABLE "NAST" WAS UPDATED'.
    ENDIF.

  • How to send the PDF file to FAX will the nast table updates

    Hi all,
    How to send the PDF file to FAX. Will the nast table updates ( which fields updates ).
    Need is once fax is send for that delivery, again it should not fax again. Will the nast table helps to check the sent fax.
    Please give me sutable suggessions....

    Have you checked Forums » Community Discussions » Code Snippets 
    I believe there were some examples on converting/sending PDF.
    Or check FM 'SO_DOCUMENT_SEND_API1' and documentation for it.

  • How NAST table is updated

    Hi,
    I have a sales order and I am generating billing document . for the same billing doument have a script form and conditional records
    Please let me know how the NAST table is updated and also how the field nast-vsztp is updated with the conditonal records for the billing documents
    if i have the conditional records How nast-vsztp is updated for a billing document .
    Thanks in advance
    Sudhakar

    Hi,
    The billing document generated with refrence of credimemo( sales order ) .Unable to put the messages.
    I maintained same customer grp3 . what conditional records contain . Still it is taking default value for the ouput type.
    Please let me know why the conditional records is not considering at all and why it is not updating NAST-VSZTP.
    Thanks in advance
    Sudhakar

  • NAST Table update

    HI
    We have around 200o invoice in which one specific output type called ZIDR is in process yellow state. We wanted to update it to green.
    Is there any utility program which updates NAST-VSTAT based on message type?
    Reg
    shan1242

    Hi Shan .,
       Program                                   Short description
       ASTBKF08                              Convert processing status single NAST
       NASTVF08                              Convert processing status single NAST
    if You need Function modules
    RV_MESSAGE_SET_PROCESS_STATE
    thanks
    Sreenivas Reddy
    Edited by: Sreenivas Reddy Dommata on Aug 21, 2008 10:56 AM

  • Reg: How to automate updation of tables between two oracle DB Instances

    Hi All,
    I have a requirement to auto update the tables between two oracle database instances. What are the possible solutions to handle this kind of situations.
    Please help me out in identifying the correct solution.
    Thanks in advance :)

    The possible solutions are outlined in the distributed database documentation
    They are
    a) trigger (6.0 and higher)
    b) advanced replication. Creates triggers on every table. Requires every table to have a primary key (8.0 and higher)
    c) Streams (Uses logminer, has no impact on table. Requires every table to have a primary key, or supplemental logging will be used. (9.0 and higher)
    d) Change Data Capture: superset of Streams (9i and higher).
    If you don't require realtime updates you don't need c or d. b is difficult to manage. Using a) the source db can potentially have to wait for the target db to complete it's transaction.
    Sybrand Bakker
    Senior Oracle DBA

  • Access NAST table immediately after creation of sales order (va01)

    Hi All,
    I want to access the nast data for the newly created sales order from va01. I tried to use program exits:
    userexit_save_document and userexit_save_documnr_prepare
    and plu the BADI BADI_SD_V46H0001 method EXIT_SAPLV46H_003.
    the breakpoint is not stoping there even if I have given.
    Please suggest any enhancements are there for such functionality.
    The flow is like this.:
    when user clicks on the save button after entering the data for sales order creation, the email/fax will be send to the contact persons for the output type and I want to update the nast table DATVR entry so that it will be marked as processed entry.
    rgds
    Madhuri

    I am not sure what you want, but I think it is not  the right way to realize the flow.
    When a sales order is saved, the process of issuing output will be handled by another program RSNAST00 (T_CODE: WE15)immediately or via a scheduled job due to output configuration , and the nast table will be updated at the same time. i think there is no need to update the nast table by yourself.

  • How RG1 reg update?

    HI..Gurus,
    How RG1 reg Update? Wt is the T.Code for that. ?What are the pre-requisites that are needed.?
    regards,
    jyothi.

    Hi Jyothi
    The sequence is like this:
    1. In SE16, enter Table name: J_2IRG1BAL, and click on Create. Enter the material Number and 'P' in Material form (Loose/Pack indicator) and click 'Save'. This step is to be done only for the first time.
    2. Do your Initial Stock entry in MB1C, movement type 561
    2. Go to J1I5, select Posting Date, Document Year and 'ROP in Classification (Receipt from outside under any other provision). Click on Create icon (Register entry)
    4. Go to J2I5 and extract the RG1 Register. You must get a green checkmark.
    5. After doing the PFI, go to J1I5, select Posting Date, Document Year and Classification 'IDH' (For domestic sales) or 'IDE' if the first removal is for Export Sale. Based on the accounting document generated during PGI (MB03) the RG1 Register gets updated with the removal for Outbound Delivery.
    6. Reextract the RG1 register in J2I5. You must get a green checkmark.For the RG1 Register printout, go to J2I6, select the option, 'Script Form' and hit 'Execute.
    All this was in OSS Note: 373001.
    Ramana ND
    PS: You must have maintained the Number range Object J_1IRG1 (RG1 Register)

  • Help tuning the query on NAST table .

    I have the below query on NAST table which is performin very badly:
    SELECT objky INTO TABLE i_objky
         FROM nast
         WHERE kappl = c_kappl            
         AND   ( ( kschl = c_kschl_zbax ) 
               OR ( kschl = c_kschl_zoem ) )
         AND   vstat = c_vstat_comp       
         AND   objtype = c_likp
          AND ( ( datvr EQ w_start_date AND
                  uhrvr GE w_start_time ) OR
                ( datvr EQ w_end_date AND
                  uhrvr LE w_end_time ) OR
                ( datvr GT w_start_date AND
                  datvr LT w_end_date ) ).
    Further there is already an index on KAPPL and KSCHL.
    Message was edited by:
            Ashish kumar

    If I understood your logic correctly - you are trying to select objects which have outputs processed within your date/time interval.
    You can try to rewrite your select to force index 'A' usage as suggested by Christian, but it is not very helpful if you have too many records in NAST as in this case this index is not very selective and optimizer usually ignores it. Of course, you can ask your BASIS folks to tell you if you can use 'hint' addition in your select to force index usage as it depends on DB and some DBs require some work to be done on DB level to enable hints.
    Other options could be
    - try to provide a range (even if it is wide enough) for object key... it may really help as NAST contains too many records for different objects and this range may help with primary key usage.
    - OR if you are interested in these 2 output types only - you can increase the speed of your select significally if you define a separate database table which you will update with these outputs (when they are just created in NAST) and your program (if it usually runs just once per your date.time range) will check the status of these outputs and then delete records from your table or just update them with "processed" status.
    You can actually just create a copy of NAST table which is going to be updated when these outputs are processed (from corresponding processing program), so you will have records there with at least date, and then based on these records you can select actual date/time from NAST. It will be much faster... but it requires more design/coding.

  • NAST  Table

    Hi,
       I got a one requirement. What is the use of NAST table?Now iam creating one custom table.In the custom table Customer Number(Kunnr) and Billing Document(VBELN) is there.And NAST table provided and they given for customer number(NAST-PARNR) And Billing Document Number(NAST-OBJKY).So what is the
    use of NAST table.Why they provide NAST-PARNR and NAST-OBJKY insted of
    customer number and billing document.Please give me reply?
    Thanks & Regards,
    sairam

    I Don't understadn what your requirement is , but the standard procedure is this.
    for example take Purchase order.
    Me21n is the transaction.
    When you save the purchase order, an output type which is attached to the ME21n transaction will trigger the PO Output driver program. The data in the ME21n transaction is transferred to the PO Driver program in NAST structure.
    Once the PO's outpt is issued succesfully, NAST table will be updated with the PO Number as Object Key. for that particular Output type.
    Regards,
    Ravi

  • How to create a Maintenance view in order to update 4 tables

    Hello,
    I want to update 4 tables having the same key. MANDANT + SIRET (fiscal french ID).
    I try to create a maintenace view, i need to update the 4 tables using a single screen.
    When i use the relationship the system display a message "Relationships with unsuitable cardinality"
    The first table contain only the ID, the 3 others contains some informations (adress, name, and others)
    Thanks for your help
    Christophe

    Hello,
    you could check, if your other three tables have a correct foreign key definition on the field  SIRET.
    Tranaction SE11 -> pstion on the field and press the foreign key button.
    Check Table has to be your first table; cardinality has to be 1 :1 or 1 to N.
    Regards Wolfgang

  • While updating a table i am getting ORA-00600 error.

    Hi all,
    While updating a table i am getting the following:
    **SQL Error: ORA-00600: internal error code, arguments: [qkebCreateConstantOpn1], [], [], [], [], [], [], [], [], [], [], []**
    **00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"**
    I am not getting how to proceed on this. Please guide me.
    Thanks,
    Ritesh

    While performing some unspecified action (no DML) on an unknown table (no DDL) in an unknown version and edition of the Oracle database you had an untrapped Oracle exceptions.
    There are too many unknowns to help you beyond recommending you open an SR at MyOracleSupport.

  • Error in updating to table WRPT

    Hi All,
    I am trying to update lenght, width and height for Material .
    After i save the article and go back "It gives Express Document " which doesnot save the changes ..
    When i checked SM31 it gives error" Error in updating to table WRPT"
    Regards
    Vikrant M Kelkar

    Still not sorted

  • Error in updating OBNK Table ( Bank Statements and Reconciliations,Manual)

    PLease advise ,
    Bank Statements and Reconciliations,Manual Reconciliation
    Client is receiving the following message:
    Error in updating OBNK Table
    Edited by: Philip Eller on May 20, 2008 9:03 AM

    Hi Darpal Thiarha,
    Please kindly refer to note 1132591 and note 1128677 to see if these are relevant to this issue. Upgrading to  2007A PL15 or above may avoid such issues relevant with the error 'Error in updating OBNK Table'.
    Regards,
    Candice Ren
    SAP Business One Forums Team

Maybe you are looking for