APEX_ITEM.date_popup does not update proper row with column sorting on

I have the following example sql report query on a page:
select rownum rowno, object_name
, object_type
,APEX_ITEM.date_popup(43, null, created, 'DD-MON-RR',9) date_created
from user_objects
This works fine when I tried to update the date if no sorting is involved. If I allow sorting in APEX by clicking the column headings, the row numbers no longer match up with the the displayed rows. So in order words, if I had the following
Row MyCol Date
1 Z
2 B
3 K
If I enabled sorting and click the MyCol column heading, then the following would result:
Row MyCol Date
2 B
3 K
1 Z
If I then enter a date for the first displayed row, MyCol=B, then it will update the MyCol=K row because it goes by rownum and it thnks it is rownum=2 where MyCol=B.
This use to work by putting in a unique id column instead of null for the 2nd parameter to the API. The latest doc says that parameter is depracated and this no longer works. It seems to always go by rownum, and therefore won't work with sorting.
Any workaround or suggestions?
We need to have a query similar to above, with sorting enabled on a number of columns and then have a custom PL/SQL process called when the submit button is pressed. It would reference the date column as APEX_APPLICATION.G_F43(I) in this example.
It used to work. Has this functionality been removed?

rwessa,
Right now, there is no reasonable workaround for this immediate issue of using APEX_ITEM.DATE_POPUP in your query and sorting via PPR. The problem is that the generated JavaScript as part of APEX_ITEM.DATE_POPUP is generated at query execution time and then sorted by the reporting engine afterwards (via AJAX/Partial Page Refresh).
About the only workarounds I can suggest are to disable column-heading sorting for the SQL-based report. If you want sorting, implement sorting via a select list and then use a region type of PL/SQL function returning query, where you append the ORDER BY clause to the SELECT statement. You may also wish to investigate using regular reports (and changing the Display As of the column) or using tabular forms, which would not exhibit this behavior.
I hope this helps.
Joel

Similar Messages

  • Multiclip editing does not update Canvas window with active angle

    Hi,
    I am trying to do some multiclip editing but for some reason when cutting between angles the canvas viewer does not update with the video. Once I stop playback the cuts are all created properly and the video changes when playing back again. However, when editing the video does not change to the active angle. The audio changes but the video does not.
    I have the multiclip playback setting in RT enabled and the canvas and viewer windows synced and matching each other when playing back, and video + audio is set in the sync menu.
    I'm now stuck! and would greatly appreciate some help.
    Thanks
    Phil

    Welcome to the family.
    I don't mean to brush you off because I understand your frustration. But what we know about mutliclip is that it really does work, if you follow the rules completely. We also know that most of the "multiclip doesn't work" posts are resolved by encouraging the user to be objective and to simply recheck the setup steps in the manual, one at a time. (Editorially speaking: There are too many of them, there are too many stupid gotchas in the multiclip setup. True. Hope springs eternal that FCP6 may fix many of these things. It should be a one-click solution.)
    You can search for multiclip here and, after filtering out the nonsense from elitists like me, you should be able to detect something in your configuration that might be keeping you from getting the performance you are expecting.
    bogiesan

  • Image does not update in loop with control

    Hi all,
    I am trying to make a data playback vi.  I have some data recorded, and images recorded from another vi saved onto my computer.
    I want to sync the data with the video, so we can tell what was happening visually when there is something interesting happening on the waveform etc
    I successfully made a real-time playback of the data and video.  The speed of the playback is selectable and works well.  The image output is inside a while loop.
    However, I would also like to make a different case where the time is selectable via a slider.
    The setup for the video playback is almost identical.  The only difference is that instead of the loop iteration output hooked up to the image array indexing, the output of the
    front panel slider is hooked up.
    However, this small changes is a big problem!  The data in the wires updates as I slide the slider fine, but the image in the front panel does not.
    If I scroll around the front panel the image WILL update, or if I zoom in or out etc.  Any action except moving the slider updates the image.
    This is somewhat confusing because the image updates with no front panel activity at all when using the iteration # output... why should the refresh care about getting
    the indexing from one source or another?
    I tried playing around with my display settings, like resolution, acceleration, color depth.  I've also added wait times.  I also tried to put in a flat case structure with the image
    update first, then checking the slider value and shift registering that around the while loop.
    It is probably something weird with Windows, but is there some way to 'trick' LabVIEW into a redraw? 

    Ah, I'm dumb.
    So when you have a selectable case structure (lets say two cases) and an image out in each it creates two image out windows in the front panel!
    The other image out was like 3 screens away for whatever reason, and THAT one was updating just fine.
    Now to put the case structure inside the while loop instead of the other way around so I can just have one image out...

  • "Activity Monitor" utility does not update the "CPU Time" column in real ti

    If I use Activity Monitor to display "All Processes", why doesn't it update the "CPU Time" column in real time? It updates the "% CPU" and others, but not the total "CPU Time". I have all columns viewed if that matters. However if you double click on a process in the Activity Monitor window, the details about the process are displayed in another window (number of threads, ports, CPU Time, Context Switches, Faults, etc), and as long as that detail window exists, the "CPU Time" column is updated in real time in the main Activity Monitor window. Is this a bug or a feature?? Does Leopard do this also? Have lots of free memory so that is not an issue. Thanks...
    -Bob

    I noticed the same behavior reported by Bob: Not regarding the "process filter" or the "update frequency" selected "CPU Time" column is only updated when details dialog is open. I noticed it just today (which triggered the search here), I wonder if this "feature" has been always present or maybe activity monitor is getting lazy?
    Regards,
    Mauro

  • JTable - Updating TableModel does not increase num rows until column resize

    Hi all,
    I'm developing an application which includes a JTable with a TableModel implementation.
    The table model consists of 2 columns - Property and Value.
    * A table model for server properties
    * Created on 09-May-2005
    package com.jc.editor.model;
    import java.util.Iterator;
    import java.util.LinkedHashMap;
    import javax.swing.table.AbstractTableModel;
    * @author crossja
    public class PropertyTableModel extends AbstractTableModel {
      private String[] columnNames = {"Property", "Value"};
      private String[][] data;
      public PropertyTableModel(LinkedHashMap p_propertiesMap)
        setProperties(p_propertiesMap);
      public void setProperties(LinkedHashMap p_propertiesMap){
        data = new String[p_propertiesMap.size()][2];
        // Insert data from hashmap into data array
        Iterator props_iterator = p_propertiesMap.keySet().iterator();
        String curr_property;
        for(int i=0 ; props_iterator.hasNext(); i++){
          curr_property = (String)props_iterator.next();
          data[0] = curr_property;
    data[i][1] = (String)p_propertiesMap.get(curr_property);
    * Get the number of columns in the table model
    public int getColumnCount() {
    return columnNames.length;
    } // getColumnCount()
    * Get the column name at the given index
    public String getColumnName(int p_index){
    return columnNames[p_index];
    }// getColumnName(int)
    * Get the number of rows in the table model
    public int getRowCount() {
    return data.length;
    } // getRowCount()
    public Object getValueAt(int rowIndex, int columnIndex) {
    return data[rowIndex][columnIndex];
    } // getValueAt()
    } // end PropertyTableModel
    When another method updates the table model, it calls the setProperties method. However, this doesn't update the JTable fully until I resize a column in the table. Here's the strange behaviour:
    If the table initially has 2 rows, and the new table model has 5 rows, then the two visible rows in the table JTable will be updated to the new values, but the three new rows do not appear. However, if I resize a column, they suddenly appear, and with the correct values.
    I've tried calling repaint on the JTable, and JPanel, but that doesn't solve the problem.
    The JTable is displayed within a JScrollPane.
    Regards,
    Jim

    change the following two lines in your program...
          data[0] = curr_property;
    data[i][1] = (String)p_propertiesMap.get(curr_property);
    // double-check the row & col indices are correct
    setValueAt(curr_property, i, 0);
    setValueAt(curr_(String)p_propertiesMap.get(curr_property), i, 1);

  • Battery Update 1.4 does not update my battery with firmware version: 102a

    Hello,
    I was happy to see this update come out recently as my battery does lose power when the computer is powered down but I wanted to fully research it first because there's no going back with these firmware updates.
    From Apple's page about this 1.4 update:
    Batteries with this information in the Battery Information section [of Apple System Profiler] need this update:
    A device name "ASMB016" or "ASMB013" in the serial number
    A Pack Lot Code is 0002
    A battery firmware version of 0110
    Everything on my system matches except my battery firmware is version: 102a
    Figuring that 102a was a lower firmware version than 0110 I went ahead and installed the update but I don't think my battery has been updated. I got no notice that it was being updated as others, on other forums, have described seeing and nothing in Apple System Profiler has changed.
    A quick Google search showed that plenty of other people are asking on the web about this version 102a firmware as well.
    So, any idea what the deal is with batteries that have the firmware version 102a? I got this current battery under the recall program as the original one that came with my MacBook was one of the bad ones.
    This whole MacBook battery business has been a nightmare. It's wasted hours of my time, and is a real black eye on what is otherwise a good computer experience.
    Thanks in advance for any input.

    Macophile wrote:
    Hello,
    I was happy to see this update come out recently as my battery does lose power when the computer is powered down but I wanted to fully research it first because there's no going back with these firmware updates.
    From Apple's page about this 1.4 update:
    Batteries with this information in the Battery Information section [of Apple System Profiler] need this update:
    A device name "ASMB016" or "ASMB013" in the serial number
    A Pack Lot Code is 0002
    A battery firmware version of 0110
    Everything on my system matches except my battery firmware is version: 102a
    Figuring that 102a was a lower firmware version than 0110 I went ahead and installed the update but I don't think my battery has been updated. I got no notice that it was being updated as others, on other forums, have described seeing and nothing in Apple System Profiler has changed.
    I started thinking about it, and 102a is actually a larger number than 0110.
    In any case, the updater was only meant for specific battery revisions.

  • DB Apdater Polling in 11g does not update the polling the column

    I have simple SOA11g process in which we are polling a table using DB Adapter:
    1) The polling column is process_flag and the read value is Y and unread value N.
    2) I inserted the record in the table withe process flag as N.
    3) The polling begins and the Composite instance is fired.
    However this process continues in an endless loop, polling the column again, after the time set in "Polling Frequency" and firing instance again. What I inferred from all this, is that the polling column i.e. process_flag is not getting updated after it's being polled. When we checked from the backend, the process_flag is always 'N'.
    Has any one faced this issue and resolved it?

    Hi
    Please check what is the PollingStrategy used in the adapter configuration,it should be LogicalDeletePollingStrategy.
    For example the configuration in the .jca file looks as shown below
    <property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
    <property name="MarkReadColumn" value="STATE"/>
    <property name="MarkReadValue" value="P"/>
    Thanks
    Albin I

  • "Mission Control" does not show space row and I cannot add a new space (27 inch screen)

    Firstly, "Mission Control" does not show upper row with spaces. I have configured Dashboard as space, but it is not showed either.
    Second, I cannot add a new space because the upper right corner wont show an empty space.
    In system I have configured (Mission Control) the upper right corner as "mission control".
    I do run a 27-inch screen

    I'm having the exact same problem. I have a Macbook Pro that I connect to a 27inch iMac through the mini display port. Whenever I attempt to launch Mission control to move a program to a different space, the "Spaces" dont appear at the top of the screen. Is anyone have an answer for this?
    Also, does anyone know of a 3rd party program to bring "Spaces" back? That was my #1 favorite thing of Snow Leopard, and I need to get that functionality back.
    Thanks

  • Manual sync to ITunes does not update music

    I have a generation 3 (I think--it looks like the model number is A1318) IPOD Touch running version 4.1 operating system.  I have ITunes version 12.0.1.26. 
    It does not automatically sync.  When I select manual sync, it appears to go through the process and indicates that it has completed the sync, but nothing has changed.  It does not update the IPOD with new songs from my library.
    Any help would be appreciated.  For example are thees operating systems compatible?  If they are what am I doing wrong.
    Thanks
    Ron

    Try backing up to iTunes and restore from backup
    iOS: Back up and restore your iOS device with iCloud or iTunes
    Note that ll the synced media like apps and music have to be on the computer since they are not included in the backup

  • Time stamp does not update automatically

    Hi, All. I want include the time stamp (yyyy-mo-dd-min-sec) in the file name. However, the value of the time stamp does not update automatically/synchronizes with the computer clock at each new run. I need to do it manually with the right click and update the time to the current.
    How can I solve this? Thanks a lot in advance.

    What does this have to do with NI counter/timer hardware?
    What language are you using and what function are you using to get a timestamp? If the language is LabVIEW, then all you need is Get Date/Time in Seconds. If you are using a front panel Time Stamp control, then you are using the incorrect function.

  • Install PT8.53 with Linux Issue: Jolt client (ip address 192.168.196.102) does not have proper application password

    Folks,
    Hello.
    I am installing PeopleTools 8.53 with Oracle Database Server 11gR1 and OS Oracle Linux 5.10.
    Data Mover Bootstrap and Application Designer can log into Database instance successfully. My procedure to run PIA is below:
    Step 1: start Oracle Database Server and LISTENR is listening.
    Step 2: start Application Server ./psadmin and 8 processes are started.
    Step 3: start WebLogic Server PIA /opt/PT8.53/webserv/PT853/bin/startPIA.sh
    In Browser, http://192.168.196.102:8000/ps/signon.html comes up successfully. But when sign in using UserID PSADMIN and password "myname", I get the error message in Browser as below:
    The application server is down at this time.
    CHECK APPSERVER LOGS. THE SITE BOOTED WITH INTERNAL DEFAULT SETTINGS, BECAUSE OF: bea.jolt.ServiceException: Invalid Session
    We've detected that your operating system is not supported by this website. For best results, use one of the following operating systems:
    Mac OS X 10.6(Snow Leopard)
    Mac OS X 10.5(Leopard)
    iPad
    Oracle Linux Enterprise
    Mac OS X 10.4(Tiger)
    Windows 8
    Windows 7
    Mac OS X 10.7(Lion)
    Regarding Application Designer, both Database Type "Oracle" and Connection Type "Application Server", UserID "PSADMIN" and password "myname" login successfully. I view TUXLOG (current Tuxedo log file) and its last screen is below:
    191723.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191723.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191723.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191724.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191724.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191724.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191724.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191724.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191725.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191725.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191725.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191726.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191726.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191726.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191726.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191726.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191727.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191727.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191727.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    191727.lucylinux.lucydomain!JSH.32462.2485226496.-2: JOLT_CAT:1626: "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password"
    I View APPSRV_1023.LOG (current server log file) and its content is below:
    PSADMIN.32259 (0) [2013-10-23T18:55:12.134](0) Begin boot attempt on domain PT853
    PSAPPSRV.32290 (0) [2013-10-23T18:55:35.701](0) PeopleTools Release 8.53 (Linux) starting. Tuxedo server is APPSRV(99)/1
    PSAPPSRV.32290 (0) [2013-10-23T18:55:35.923](0) Cache Directory being used: /home/user/psft/pt/8.53/appserv/PT853/CACHE/PSAPPSRV_1/
    PSAPPSRV.32290 (0) [2013-10-23T18:56:19.256](2) App server host time skew is DB+00:00:00 (ORACLE PT853)
    PSAPPSRV.32290 (0) [2013-10-23T18:56:23.504](0) Server started
    PSAPPSRV.32290 (0) [2013-10-23T18:56:23.507](3) Detected time zone is EDT
    PSAPPSRV.32338 (0) [2013-10-23T18:56:25.793](0) PeopleTools Release 8.53 (Linux) starting. Tuxedo server is APPSRV(99)/2
    PSAPPSRV.32338 (0) [2013-10-23T18:56:26.003](0) Cache Directory being used: /home/user/psft/pt/8.53/appserv/PT853/CACHE/PSAPPSRV_2/
    PSAPPSRV.32338 (0) [2013-10-23T18:57:08.871](2) App server host time skew is DB+00:00:00 (ORACLE PT853)
    PSAPPSRV.32338 (0) [2013-10-23T18:57:10.662](0) Server started
    PSAPPSRV.32338 (0) [2013-10-23T18:57:10.663](3) Detected time zone is EDT
    PSSAMSRV.32388 (0) [2013-10-23T18:57:12.159](2) Min instance is set to 1. To avoid loss of service, configure Min instance to atleast 2.
    PSSAMSRV.32388 (0) [2013-10-23T18:57:12.168](0) PeopleTools Release 8.53 (Li nux) starting. Tuxedo server is APPSRV(99)/100
    PSSAMSRV.32388 (0) [2013-10-23T18:57:12.265](0) Cache Directory being used: /home/user/psft/pt/8.53/appserv/PT853/CACHE/PSSAMSRV_100/
    PSSAMSRV.32388 (0) [2013-10-23T18:57:59.414](0) Server started
    PSSAMSRV.32388 (0) [2013-10-23T18:57:59.416](3) Detected time zone is EDT
    PSADMIN.32259 (0) [2013-10-23T18:58:48.149](0) End boot attempt on domain PT853
    PSAPPSRV.32290 (1) [2013-10-23T18:59:06.144 GetCertificate](3) Returning context. ID=PSADMIN, Lang=ENG, UStreamId=185906140_32290.1, Token=PT_LOCAL/2013-10-23-11.59.26.248432/PSADMIN/ENG/vSz0ix+wq8d+zPRwQ0Wa4hcek0Q=
    ~                                                                                                                                                        
    I think the error is indicated in TUXLOG file "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password". The application password "myname" in Browser http://192.168.196.102:8000/ps/signon.html page is not working. I use the same password "myname" to login Data Mover Bootstrap mode, Application Designer, and Application Server psadmin configuration successfully. I have tried a few other passwords in Browser http://192.168.196.102:8000/ps/signon.html page but not working.
    My question is:
    How to solve Sign In issue on http://192.168.196.102:8000/ps/signon.html that is "ERROR: Jolt client (ip address 192.168.196.102) does not have proper application password" ?
    Thanks.             

    Dear Nicolas,
    Hello. I have used the same password for "DomainConnectPswd" in the file Configuration.properties with that for Application Server setting. Eventually, UserID PSADMIN sign in http://192.168.196.102:8000/ps/signon.html successfully. PeopleTools 8.53 runs correctly in Browser.
    It seems that whether upgrade Oracle Linux 5.0 to the latest 5.10 does not have effect !
    I am very grateful to your great help for this installation of PT8.53 with Linux and Oracle Database !

  • HT1277 Mail on my Mac computer does not update when I update my mail on my phone and iPad.  Can anyone help me with this?  Is there a setting I need to check?

    Mail on my Mac computer does not update when I update my mail on my iPhone and iPad. Can anyone help me with this?  Is there a setting that I need to check?

    All that you had to do was to sign into the old account in order to update those apps. What I mean is that you just needed to sign into that account in the store settings like I described and that should have worked. You didnt need to enter the credit card information again - you justed needed to use the old ID and password.
    Anyway, I think the good news is that if everything else is OK with the new account, just download iBooks with the new ID - it's a free app so its not like you have to pay for it again. I'm not sure what the other App is that you are talking about - but if it is the Apple Store App - that is free as well.
    Try this anyway, when you try to update iBooks, just use the old password if the old ID still pops up.
    Did you try signing into the store settings with your new ID and see what happens with the updates then?

  • My mail program does not update when I delete emails in my other email programs (i.e. it still shows messages in my mail inbox when I've deleted them).  I think this started with Maverick?  Any solutions?

    My mail program does not update when I delete emails in my other email programs (i.e. it still shows messages in my mail inbox when I've deleted them).  I think this started with Maverick?  Any solutions?

    one is gmail, one is a university email and they are both IMAP accounts (not that I know what that means)....

  • When I sync my iPad with iTunes it does not update the play count?  Is there a setting I need to change?

    When I sync my iPad with iTunes it does not update my play counts.  Is there a way to make this happen?

    Are you using iTunes Match by chance?  I had no problems whatsoever with play counts synching between any of my devices until I started using iTunes Match.  I turned it off and magically my play counts synced.  Once. Hasn't happened again though. 

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

Maybe you are looking for