How does CLOSED_CODE updated in PO_LINES_ARCHIVE_ALL table

Hi,
  How does CLOSED_CODE column will be updated in PO_LINES_ARCHIVE_ALL table. We have setup "Archive On Approve" for archiving.
  Does below is a valid check to verify the line count between lines table and archive table?
  We are comparing the line count in Lines table and Archive table, and if there is difference in count, then it is assumed to be change in the Lines,
  so then direct the PO Approval Worfkflow for re-approval.
  Kindly suggest if below check is correct or not, especially check on CLOSED_CODE='OPEN'.
  In few cases, the lines in PO_LINES_ALL table has CLOSED_CODE = 'CLOSED' but, PO_LINES_ARCHIVE_ALL table has lines with CLOSED_CODE = 'OPEN' even after PO approval.
  Is this expected behavior? When Does CLOSED_CODE will get updated in archive table?
SELECT COUNT(*)
         INTO x_lines_count
         FROM po_lines_all
        WHERE closed_code = 'OPEN'
          AND po_header_id = x_po_header_id;
       SELECT COUNT(*)
         INTO x_ar_line_count
         from po_lines_archive_all
      where closed_code = 'OPEN'
        and latest_external_flag = 'Y'
        and po_header_id = x_po_header_id;
IF x_lines_count <> x_ar_line_count THEN
     RESULT: "Change in PO Lines";
Regards,
Ram

Sathyaseelan wrote:
Hi All,
After creating requisition from R12 iProcurement , the column document_type_code in the table PO_REQUISITION_LINES_ALL got updated as BLANKET or CONTRACT.
Need to know how these values was defaulting in the requisition.
I am able to see the values soon after added the item to shopping cart.
Regards,
SathyaI think whatever the item is in the requistion..It should be associated with the blanket or contract agreement..that the reason why you are seeing that document type code
HTH
Mahendra

Similar Messages

  • How does one update Std Table EDIPHONE(there is no Table Maintainance)?

    How does one update Std Table EDIPHONE(there is no Table Maintainance)?
    Regards,
    Shashank.

    You should not update the standard database table directly.
    through the partner profile tcode: WE20 you can update the table EDIPHONE.
    u can choose required partner profile in the WE20, select the tab 'Telephony', and update the data, the table EDIPHONE will get updated.
    if you want to maintain this edi phone data for a particular message type/s then select inbound/output parameters and double clikc on it, go to last tab in teh screen 'Telephony',  and updated the required data.

  • How does SAP updates MKPF Table Through TCODE MB0A

    Hello There,
       how does SAP updates MKPF Table Through TCODE MB0A ( POST GOODS RECEIPT )? I tried to debug the same by posting GR, but could not figure out.
    Awaiting Reply
    Santosh

    Hi ,
    These are the table that are updated through the MB0A ,,
    DGESV DMAEX DMAKT DMAPE
    DMARM DMEAN DMKAL DMLAN
    DPROW DQMAT DUNGV MARA
    MARC MARD MBEW MFHM
    MLGN MLGT MPGD MPOP MVKE,
    MCHA, MCHB, MCHD.
    Regards,
    Bharani

  • How does one update Flash? I currently cannot watch videos on You Tube, it says I need to upgrade, I have no problem doing this on a PC.

    How does one update Flash? I currently cannot watch videos on You Tube, it says I need to upgrade, I have no problem doing this on a PC.

    If you're not using chrome you can just go to adobe's website (http://get.adobe.com/flashplayer/) and download the newest flash player.  You run the .dmg and then open the application, which updates flash.  With the latest version of flash there should be a preference pane within system preferences to allow you to change settings and check for updates.

  • How does one update Subtemple value from Yes to No?

    Greetings! In the instructions of a published problem statement (Note ID: 808571.11) there is a line that says:
    "c) Check if the subtemplate is set to NO. Update it to NO if it is set to Yes."
    How does one update the Subtemplate value from Yes to No? In edit configuration, I do not see a Subtemplate value column.
    Many thanks in advance fr your suggestions.
    Tom

    With all due respect ... I do not see how one can change the Subtemplate value from Yes to No. When I query the offending Template, the Subtemplate column is not displayed in bold, indicating to me that it can not be updated. Clicking on Edit Configuration, doe not provide an ability to change the value either.
    As best I can determine, one needs to 1) query up the template
    2) download the rtf file(s)
    3) end date the template
    4) create a new template and then set the Subtemplate value to No.
    And the same steps appear to be required in order to add or update a template Description.
    Which raises the question, Why can this not be done by editing the configuration?

  • How Does iPad Update Its Clock?

    I noticed that time on my iPad 3G 64GB is slightly different (less than a minute) from time of my MacBook Pro, that itself is different from time of my iPhone.
    How does iPad update it's clock?
    Thanks in advance,
    lux

    lvcivs wrote:
    I noticed that time on my iPad 3G 64GB is slightly different (less than a minute) from time of my MacBook Pro, that itself is different from time of my iPhone.
    How does iPad update it's clock?
    Thanks in advance,
    lux
    Your MBP updates time from a time server over the internet. The iPhone sets the time using the cell phone system. My AT&T iPhone is always 1 minute behind my MBP.
    I think that the iPad syncs time with iTunes or through the WiFi network. My iPad which syncs to my MBP and uses WiFi from an Apple AirPort Extreme has the same exact time as my MBP, down to the second (they switch minutes simultaneously). I might be wrong on this point, so if someone knows something more, I will stand corrected.

  • How does Vault Update - all or only altered data?

    With a vault already established, how does the update vault process works? In other words, let say I modified or created 10 image versions (of the 3,000 plus stored in Aperture). If I update the valut (on a external HD), are all pictures overwritten or just the new data that's changed?

    Hi Jim,
    The vault functionality is basically a sync functions. After updating a vault, the vault will be a copy of you Aperture Lib. This means that images that you have deleted from you lib will be deleted from you vault. Notice that the images are not gone, but copied to a folder called deleted images.
    Best regards - Per.

  • Hi, how does one update the iPad A1219 to a 7? Ahhhhh is it possible?

    HI, how does one update an iPad Apple A1219 to a 7?

    No. it's not possible. The original iPad hit the wall at iOS 5.1.1. It can not run anything higher.

  • BAPI_ACC_DOCUMENT_POST does not update BKPF/BSEG tables

    Hello,
    I used bapi_acc_document_post to post a accounting document The following routine says that the document is successfully posted, however, does not update the acccounting tables. I read several messages on the SDN and unable to get the correct answer.
    Your help is appreciated.
    Regards
    William
    REPORT ze_bapi_acc_document_post .
    SELECTION-SCREEN BEGIN OF BLOCK bl01 .
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      ref_key LIKE bapiache01-obj_key DEFAULT 'TEST000001BAPICALL',
      dest    LIKE bdi_logsys-logsys  DEFAULT '          '.
    SELECTION-SCREEN END   OF BLOCK bl01 .
    DATA:
      gd_documentheader    LIKE bapiache09,
      gd_customercpd       LIKE bapiacpa09,
      gd_fica_hd           LIKE bapiaccahd,
      it_accountreceivable LIKE TABLE OF bapiacar09 WITH HEADER LINE,
      it_accountgl         LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
      it_accounttax        LIKE TABLE OF bapiactx09 WITH HEADER LINE,
      it_criteria          LIKE TABLE OF bapiackec9 WITH HEADER LINE,
      it_valuefield        LIKE TABLE OF bapiackev9 WITH HEADER LINE,
      it_currencyamount    LIKE TABLE OF bapiaccr09 WITH HEADER LINE,
      it_return            LIKE TABLE OF bapiret2   WITH HEADER LINE,
      it_receivers         LIKE TABLE OF bdi_logsys WITH HEADER LINE,
      it_fica_it           LIKE TABLE OF bapiaccait WITH HEADER LINE,
      it_accountpayable    LIKE TABLE OF bapiacap09 WITH HEADER LINE,
      it_paymentcard       LIKE TABLE OF bapiacpc09 WITH HEADER LINE,
      it_ext               LIKE TABLE OF bapiacextc WITH HEADER LINE.
    PERFORM fill_internal_tables.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
      DESTINATION dest
      EXPORTING
        documentheader    = gd_documentheader
        customercpd       = gd_customercpd
        contractheader    = gd_fica_hd
      TABLES
        accountgl         = it_accountgl
        accountreceivable = it_accountreceivable
        accountpayable    = it_accountpayable
        accounttax        = it_accounttax
        currencyamount    = it_currencyamount
        return            = it_return.
    WRITE: / 'Result of check all:'.                            "#EC NOTEXT
    PERFORM show_messages.
      DATA: l_type LIKE gd_documentheader-obj_type,
            l_key  LIKE gd_documentheader-obj_key,
            l_sys  LIKE gd_documentheader-obj_sys.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader    = gd_documentheader
          customercpd       = gd_customercpd
          contractheader    = gd_fica_hd
        IMPORTING
          obj_type          = l_type
          obj_key           = l_key
          obj_sys           = l_sys
        TABLES
          accountgl         = it_accountgl
          accountpayable    = it_accountpayable
          accounttax        = it_accounttax
          currencyamount    = it_currencyamount
          return            = it_return
        EXCEPTIONS
          OTHERS  = 1.
      WRITE: / 'Result of post:'.                               "#EC NOTEXT
    PERFORM show_messages.
    REFRESH IT_RETURN.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'.
    IMPORTING
      RETURN        = IT_RETURN.
        COMMIT WORK.     .
    BREAK-POINT.
         Form  fill_internal_tables
    FORM fill_internal_tables.
      PERFORM fill_header.
      PERFORM fill_accountgl.
      PERFORM fill_accountap.
      PERFORM fill_accounttax.
      PERFORM fill_currencyamount.
    ENDFORM.                               " fill_internal_tables
         Form  Show_messages
    FORM show_messages.
      IF it_return[] IS INITIAL.
        WRITE: / 'no messages'.
      ELSE.
        SKIP 1.
        LOOP AT it_return.
          WRITE: /    it_return-type,
                 (2)  it_return-id,
                      it_return-number,
                 (80) it_return-message,
                      it_return-message_v1,
                 (20) it_return-parameter,
                 (3)  it_return-row,
                      it_return-field.
        ENDLOOP.
      ENDIF.
      ULINE.
    ENDFORM.                               " Show_messages
          FORM fill_accountgl                                           *
    FORM fill_accountgl.
    Actual invoice line
      CLEAR it_accountgl.
      it_accountgl-itemno_acc     = 2.
      it_accountgl-gl_account     = '0000009223'.
      it_accountgl-item_text      = 'Line Iten'.  "#EC NOTEXT
      it_accountgl-profit_ctr     = 'DNDDUMMY'.
      it_accountgl-comp_code      = '0180'.
      it_accountgl-tax_code       = 'IG'.
      it_accountgl-FUNDS_CTR      = '1985BA'.
      it_accountgl-COSTCENTER     = '1985BA'.
      it_accountgl-FUND           = 'C113'.
      it_accountgl-TAXJURCODE     = 'CAON'.
      APPEND it_accountgl.
    ENDFORM.                    "fill_accountgl
          FORM fill_header                                              *
    FORM fill_header.
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
       IMPORTING
         own_logical_system = gd_documentheader-obj_sys.
    OBJ_TYPE has to be replaced by customers object key (Y* or Z*)
    gd_documentheader-obj_type   = 'BKPFF'.
    gd_documentheader-obj_key    = ref_key.
    gd_documentheader-BUS_ACT    = 'RMRP'.
      gd_documentheader-username   = sy-uname.
      gd_documentheader-header_txt = 'BAPI Test'.               "#EC NOTEXT
    gd_documentheader-obj_key_r  =
    GD_DOCUMENTHEADER-reason_rev =
      gd_documentheader-comp_code  = '0180'.
    GD_DOCUMENTHEADER-AC_DOC_NO  =
      gd_documentheader-fisc_year  = '2008'.
      gd_documentheader-doc_date   = sy-datum.
      gd_documentheader-pstng_date = '20070901'.
    GD_DOCUMENTHEADER-TRANS_DATE = SY-DATUM.
    GD_DOCUMENTHEADER-VALUE_DATE =
    GD_DOCUMENTHEADER-FIS_PERIOD =
      gd_documentheader-doc_type   = 'RE'.
      gd_documentheader-ref_doc_no = '6000009268'.
    GD_DOCUMENTHEADER-COMPO_ACC  = 'FI'.
      gd_documentheader-bus_act    = 'RFBU'.
    ENDFORM.                    "fill_header
          FORM fill_ap                                                  *
    FORM fill_accountap.
    vendor line
      CLEAR it_accountpayable.
      it_accountpayable-itemno_acc = 1.
      it_accountpayable-comp_code = '0180'.
      it_accountpayable-pmnttrms = '0006'.
      it_accountpayable-TAX_CODE = 'IG'.
      it_accountpayable-vendor_no  = '0001200051'.
      it_accountpayable-item_text  = 'Vendor Line'. "#EC NOTEXT
      APPEND it_accountpayable.
    ENDFORM.                    "fill_accountap
          FORM fill_tax                                                 *
    FORM fill_accounttax.
    tax line
      CLEAR it_accounttax.
      it_accounttax-itemno_acc = 3.
      it_accounttax-gl_account = '0000081710'.
      it_accounttax-tax_code   = 'IG'.
      it_accounttax-acct_key   = 'VST'.
      it_accounttax-TAXJURCODE     = 'CA00'.
      APPEND it_accounttax.
    ENDFORM.                    "fill_accounttax
          FORM fill_currencyamount                                      *
    FORM fill_currencyamount.
      CLEAR it_currencyamount.
      it_currencyamount-itemno_acc   = 1.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'CAD'.
      it_currencyamount-amt_base     = '106.00'.
      APPEND it_currencyamount.
      CLEAR it_currencyamount.
      it_currencyamount-itemno_acc   = 2.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'CAD'.
      it_currencyamount-amt_base     = '100.00'.
      APPEND it_currencyamount.
      CLEAR it_currencyamount.
      it_currencyamount-itemno_acc   = 3.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'CAD'.
      it_currencyamount-amt_base     = '6.00'.
      APPEND it_currencyamount.
    ENDFORM.                    "fill_currencyamount

    U have to implement the BADI for this.. ‘AC_DOCUMENT’
    Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,
    *---<SAPLBPFC> is for Posting      with BAPI: BAPI_ACC_DOCUMENT_POST
      *---<SAPCNVE > is for Posting(Tax) with BAPI: BAPI_ACC_DOCUMENT_POST
      *---<SAPMSSY1> is for Test(Check)  with BAPI: BAPI_ACC_DOCUMENT_CHECK
    DATA: wa_header TYPE acchd.
        IF sy-xprog NE ' SAPMSSY1 '.
          CLEAR wa_header.
          wa_header = im_document-header.
          ex_document-header-bktxt = wa_header-bktxt.
          CLEAR wa_header.
        ENDIF.

  • How can I update a customized table from a text document?

    Hi,
    I am one sample file. The file is an text document. From this .txt file how can I update a customized table in SAP.
    How can I Update the fields in the Customized table.
    Thanks & Regards,
    NManohar.

    use the Function module GUI_UPLOAD or WS_UPLOAD and give the path and the file name from where the data has to be uploaded. in table parameter give the iternal table
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and finally use insert command to update the database table with the data

  • How can I update the trigger table?

    I need a insert trigger on a table and also wants to insert the result value in one of its field.
    it gives mutating error........
    so wots the way of updating it? how can i update the same table.

    For example like this (inside the BEGIN/END section of the trigger):
    :NEW.Col2 := :NEW.Col1;
    C.

  • How can i update the ADRT table REMARK field

    How can i update the ADRT table REMARK field
    by using only function modules or BAPI's not by direct update's
    please help me
    i need it urgently

    Hi,
    you can try this code:
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
        IF sy-subrc = 0.
          CLEAR adrct.
          SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
          IF sy-subrc = 0.
            adrct-remark = wa_remark.
            MODIFY adrct.
          ENDIF.
        ENDIF
    best regards,
    Thangesh

  • If record is in application server how do u update the single table

    hi
    could anybody tel me
    if record is in application server how do u update the single table
    by using direct input method

    If your Flash player/plugin is older, the only way is to go to Adobe's site (use Limnos' link) and download the full installer. A .DMG file, which you doubleclick to have it mount on the desktop. Inside is the Flash installer app you doubleclick to run and have it upgrade all. Will need an Admin user account.
    After you've upgraded to the latest & greatest, currently 11.5.502.110, a Flash perfpane will show up in System Preferences, where you can set it to auto-update itself, warn you of new updates or manually check for same.

  • How does one update from iwork '09?

    I followed blog advice to download iwork trial and try to upload from there, but no dice. how does one update from iwork /'09???

    With all due respect ... I do not see how one can change the Subtemplate value from Yes to No. When I query the offending Template, the Subtemplate column is not displayed in bold, indicating to me that it can not be updated. Clicking on Edit Configuration, doe not provide an ability to change the value either.
    As best I can determine, one needs to 1) query up the template
    2) download the rtf file(s)
    3) end date the template
    4) create a new template and then set the Subtemplate value to No.
    And the same steps appear to be required in order to add or update a template Description.
    Which raises the question, Why can this not be done by editing the configuration?

  • How do I update a Nested Table of inherited Object Types?

    Does anyone know why the following line (commented out) doesn't work and what I can do? Is there some way to cast the column I am trying to update? I think I am going crazy....
    create or replace type person_ot as object (name varchar2(10)) not final;
    create or replace type student_ot under person_ot (s_num number) not final;
    create type person_tt as table of person_ot;
    declare
    lv_person_list person_tt;
    lv_sql varchar2(1000);
    ref_cur sys_refcursor;
    begin
    lv_sql:= 'select new student_ot(''fred'', 100) from dual
    union all
    select new student_ot(''sally'', 200) from dual';
    open ref_cur for lv_sql;
    fetch ref_cur bulk collect into lv_person_list;
    close ref_cur;
    dbms_output.put_line(lv_person_list.count);
    for i in lv_person_list.first..lv_person_list.last loop
    lv_person_list(i).name := initcap(lv_person_list(i).name ); -- This works!
    lv_person_list(i).s_num := 9999;  Why doesn't this line work and how can I update the column s_num ??? :-(
    end loop;
    end;
    /

    Hi Tubby - You are right...It would make sense to create the Type as type of student_ot. Only problem is I am trying to keep it generic. I will include full listing to show what I am doing...
    create or replace type person_ot as object (name varchar2(10)) not final;
    create or replace type student_ot under person_ot (s_num number) not final;
    create type person_tt as table of person_ot;
    create table persons of person_ot;
    declare
    lv_person_list person_tt;
    lv_sql varchar2(1000);
    ref_cur sys_refcursor;
    begin
    lv_sql:= 'select new student_ot(''fred'', 100) from dual
    union all
    select new student_ot(''sally'', 200) from dual';
    open ref_cur for lv_sql;
    fetch ref_cur bulk collect into lv_person_list;
    close ref_cur;
    for i in lv_person_list.first..lv_person_list.last loop
    lv_person_list(i).name := initcap(lv_person_list(i).name );
    lv_person_list(i).s_num := 9999;*                             Why doesn't this line work?? :-(
    end loop;
    forall i in lv_person_list.first..lv_person_list.last
    insert into persons values lv_person_list(i);
    end;
    /

Maybe you are looking for

  • Update Error on Adobe Update... CS4 no longer works

    Recently I downloaded the latest adobe update... and now it seems like CS4 is falling apart, mainly photoshop...here are the current problems I am faceing Program |Problem Photoshop Extended CS4| unable to open or create new files due to an error |th

  • Screen colours inverted, also flickers back to normal

    Model: HP15-N096EA When the laptop is turned on the screen colurs are inverted i.e. blue becomes orange, white becomes black etc. at times it flickers back to normal colours i.e blue shows as blue etc. I have checked magnifers invert colours isn't tu

  • Printing duplex from template - won't flip

    When I use the Birthday Card template and wish to print it using the duplex feature of my printer, the second page does not print upside down (or whatever that orientation should be). When printed, the card when folded would have page 2 - with the me

  • Moving preferences from local to domain account

    I've been given the task of adding a handful of Macs to an AD domain. So far I've added 2 with no issues. My problem is this: all of the Macs have been in use for months or more and have local accounts on them. I'm looking for a way to bring my users

  • Would like some input on models please.

    I have been Mac user for years and want to get an Ipad but like most money is tight, Have a friend that has a brand new 64gig IPad 1 in box never used. Only want one to use when travial for email, online banking, a little surfing and a few movies and