Need to copy the current order-by clause of a report.

Situation:
- I have a report with a default sort setting, and sortable column headers.
- User navigates to page with this report.
- Report page renders in default sort setting.
- User changes sort (clicks on one of the column headers).
I now want to create a button (and process) to copy the current report data including the sort it is in right now. For this I need to somehow find out what the current order-by clause is of the rendered report.
I'm looking into always saving the REQUEST in an application item in case the request is LIKE 'fsp_sort%'. And then parse this value in the process.
Any better way of doing this?
Toon

Toon,
eventually this example may help you:
http://htmldb.oracle.com/pls/otn/f?p=31517:69
Denes Kubicek
http://deneskubicek.blogspot.com/
http://htmldb.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • I NEED TO FIND THE PURCHASE ORDER NO.

    HAI ALL,
         I NEED TO FIND THE PURCHASE ORDER NO.
    I have MATNR (material no.), LIFNR (vendor no.), RDOC OR MBLNR (material doc.no). values of these in my internal table. Using this i need to find purchase order no. I HAVE TRIED WITH MSEG TABLE ,but purchase order no. is not stored there.
    PL. tell me TABLE NAME OR HOW TO JOIN THA TABLES OR ANY VIEWS to find purchase order no.
    If u need any clarification regarding my req. pl send mail to below address.
    [email protected]
    THANKS IN ADVANCE,
    SENTHIL KUMAR

    HAI,
        THANKS FOR UR REPLY.
    I am using 541 movement type, (which is used for subcontracting)
    my req. is for 541 movement type in which table purchse order no. and mblnr(material doc. no.) are stored.
    Thanks in advance
    senthil kumar

  • I Need to Write the current Date and Time

    I need to write the current date and time to calculate the spend time in each instruction.
    What is the instrucion?
    Thanks.
    MIGUEL ANGEL CARO
    [email protected]

    The current time can be determined with a Date object:
    Date now = new java.util.Date() ;or if you are interested in the seconds since the epoch:
    System.currentTimeMillis() ;If you wanted to print them out:
    System.out.println( new java.util.Date() ) ;
    System.out.println( System.currentTimeMillis() ) ;Kenny

  • I need to get the Current System Date and time in the format

    I need to get the Current System Date and time in the format
    *6/24/2009 11:30:29 AM*
    How do i do it ?

    I seem to be saying this a lot lately.
    Google is your friend.
    I googled "java current date format" and SimpleDateFormat featured prominently in the results.

  • Needed to copy the share from one server to share in another server

    Hi ,
    Needed to copy the data from one share named as xyz in the server 1 to the another share abc in another server 2.
    Share xyz data should be copied to the share abc which has already different data in it .We need to copy all the data from the share xyz to the share abc  without deleting any existing data in the destination share.
    I know that /MIR option will replace the destination same as source
    Can anybody help us in the Robocopy command & switches for this activity?
    Any help is greatly appreciated!
    Thanks & Regards S.Swaminathan Live & let others live!!!

    Hi Mandy,
    Thanks for your reply.
    I have done many robocopy for the share movements from the one server joined in a domain to another server joined in the same domain.In that instances, the destination server will not be having any share of the old server name and just I robocopy the share
    from the old server to the new server after creating a new share .The usual command is as follows:
    "\\server1\oldshare" \\server2\newshare" *.* *.* *.* /ZB /E /COPY:DATO /XJ /R:0 /W:0 /TEE /dcopy:T /NP /log:c:\robocopy.txt
    And after the copy , during the cutover of the standalone DFS pointing to the new share , the domain users in the corresponding access groups (name of the groups based on the old server name) of Full,Modify,Read will be appropriately copied to the respective
    new  groups (name of the groups based on the new server name) of the new share and the access is ensured by the users.
    But in this case , the destination server is already having a share with existing data in it and to be added with the old share data
    My question is shall I use the same command as before by copying all the data to the newly created subfolder inside the existiing destination share through the following command
    "\\server1\oldshare" \\server2\newshare\new sub-folder" *.* *.* *.* /ZB /E /COPY:DATO /XJ /R:0 /W:0 /TEE /dcopy:T /NP /log:c:\robocopy.txt
    You have already mentioned /E without purge options will do.
    Just asking one more time for the safer side
    Thanks & Regards S.Swaminathan Live & let others live!!!

  • I need to get the current assignee for a given request using SOA's java api

    I'm developing a spring app that interfaces with Oracle SOA suite and executes the actions such as approving requests using the api. I need to get the current assignee for each SOA Task this is dispalyed in the OIM console so it is getting it from somewhere. I tried getApprovers in the ITaskService api but this returns an empty list

    I have checked it once again and there indeed are links for ALUI components for Solaris on SPARC at edelivery.oracle.com. (Officially ALUI supports Solaris on SPARC only)
    If you have looked at Solaris x86, then you must not have found them. Please make sure that you are selecting the righ platform. Also, make sure that you click on the Aqualogic media pack so as to get the lists of the components included in it. (Point to Note: You need to go to the next level)
    For whichever component you are not able to find, try looking for it in the Metalink (My Oracle Support) if you have a support contract.

  • How i can see the Current Order documents

    Hi Gurus,
    can any body  tell me how can i see the current order number documents? in T.Code - KONK  i see that the number range status shows current order document number. but i cannt trace where it to see the document?
    also i check the Order Actual Line Item & Plan Line Item at the time message arrise that Order doesnot exit.
    but in KONK - the current number range status shows the order document number.
    pls help me to overcome the problem.
    Point will be rewarded
    Than'x
    Dhananjay

    Hi,
    you are mistaking KONK with KANK. KONK ist the number range for internal order master data (i.e. order numbers). Please check this via AUFK. Line items have nothing to do with KONK.
    Regards
    Karl

  • I would like to get certified for the SAP Crystal Reports. So, I would like to get some info about the currently available Certification Exams for Crystal Reports (2011/2013). Also, would greatly appreciate  if you have any suggestions for thi

    Hi,
            I would like to get certified for the SAP Crystal Reports. So, I would like to get some info about the currently available Certification Exams for Crystal Reports (2011/2013). Also, would greatly appreciate  if you have any suggestions for this Certification Exam preparation materials from another 3rd party or from SAP directly .  I would like to prepare or get trained well before taking the exam as I see it costs around $500.
    Thanks in advance for your help in this regard!
    Sincerely,
    J

    Please search here.. Training and Certification Shop for your desired certification or training. Don't forget to set your location.
    Please use some summarized title for your query.

  • Main Server crashed. Currently using AD that exist in a desktop computer with Sever 2008 R2 Standard installed. Need to copy the AD to the main server. All in same IP range.

    Hi Guys,
    Unfortunately the main server crashed and I have re-installed Server 2008 R2 Standard in it. The server had only ADDS, DNS Services and File Services. I have the AD on a desktop computer where Server 2008 R2 Standard is installed. All the user computers
    and the servers are in same IP range. I tried replication but an error pops up saying "you will not be able to install a writable replica domain controller at this time because the RID master DC-TURBO.turbo.com is offline"
    CAN ANYONE HELP ME TO FIX THIS ISSUE OR IS THERE ANY WAYS TO MAKE MY MAIN SERVER UP.!!!
    HELP ME PLEASE

    Hi Guys,
    Unfortunately the main server crashed and I have re-installed Server 2008 R2 Standard in it. The server had only ADDS, DNS Services and File Services. I have the AD on a
    desktop computer where Server 2008 R2 Standard is installed. All the user computers and the servers are in same IP range. I tried replication but an error pops up saying "you will not be able to install a writable replica domain controller
    at this time because the RID master DC-TURBO.turbo.com is offline"
    Assuming that you have an additional domain controller on your desktop computer, you will need too SEIZE the FSMO roles to your desktop computer. Then re-install the OS on the old DC and do a Metadata cleanup and then go with promoting
    the additional domain controller. These are the tasks which you need to do:
    Seize the FSMO roles from your crashed old DC to your desktop computer. Using Ntdsutil.exe to transfer or seize FSMO roles to a domain controller
    Do a Metadata cleanup and remove old objects related to your crashed DC.  Clean Up Server Metadata
    Re-install OS on your OLD Sever and promote it as additional domain controller to your desktop computer(DC).
    Transfer the FSMO roles back to your server which is a clean DC now. How to view and transfer FSMO roles in the graphical user interface
    Mahdi Tehrani   |  
      |  
    www.mahditehrani.ir
    Please click on Propose As Answer or
    to mark this post as
    and helpful for other people.
    This posting is provided AS-IS with no warranties, and confers no rights.
    How to query members of 'Local Administrators' group in all computers?

  • Problem with the Pivote Table order by Clause in OBIEE report

    Hello All,
    Can anyone help?
    I am developing a report with 3 columns
    1. Year
    2. Customer name
    3. Amount
    I need Year in Ascending & Amount Descending (Group by Year and then Desc by amount)
    In Table view data is displayed correctly, but in Pivote Table it’s not sorting correctly
    Table View ( This is correct)
    Year     Customer Name     Amount
    2009,     a1,     260,000.00
         a2,     152,030.00
         a3,     20,000.00
    2008,     a6,     193,080.00
    2004,     a7,     860.2
         a8,     114.7
    2003,     a9,     200,243,813.40
         a10,     91,351,364.10
    Pivote Table Results as follows:
    Year     Customer Name     Amount
    2009,     a1,     260,000.00
         a2,     152,030.00
         a3,     20,000.00
    2008,     a6,     193,080.00
    2004,     a7,     860.2
         a8,     114.7
    2003,     x,     26,374,818.00
    y, ....................
    a9, 200,243,813.40
    For year 2003 in place of 'x' value a9 value has to be shown........
    Regards,
    SMA

    Your post doesn't help a lot. Why it's still not solved ?
    If it's caused by the ascendant order, the only way that you have is to pivot your table :
    http://gerardnico.com/wiki/dat/obiee/presentation_service/obiee_transformation_table_to_pivot
    And then you can set all sort that you want.
    success
    Nico

  • I need to get the service order number in the error message

    i need to display the error message with the service order number telling that
    "record does not exist for service order xxxxxxxxx"
    xxxxx-should be the service order number.

    you can define a error no. in message class se91.
    if the error is suppose 101.
       101 - Record does not exist for service &
    use & to concatenate ur variable with the message.
    if you want more than one just addon & to that
    like 4 varibles
       101 - Record does not exist for service & & & &
    in ur code, u can display the message like
    MESSAGE i(ZE)101 with variable
    ZE is ur message class

  • Need to display the Current Quarter Data

    Hi Gurus,
    We have a requirement in the report as follows:
    I have a Key Figure - 0Balance. In this it should display the current quarter data.
    We have 5 plants and this report is specific to a plant X which runs 3 month behind.
    So in the variables screen, if I enter 006.2007, it should display the data of 003.2007. Please guide me through the steps...Thanks in advance.

    Hi,
    For getting current quarter data there is std variable available 0CMCQUAR , restrict KF wiht the variable and system should show you current quarter balance.
    For getting balance for previous quarter , copy the kf just created and right click on it , click on the variable right hand side -> specify offset -> put -1. and it should give last quarter data.
    Hope that helps.
    Regards
    Mr Kapadia

  • Need to copy the present address as permanent in the core HR address form a

    Hi All,
    Is there any way werein we can copy the present address as permanent in the core HR address form and also in in the selfservice applications?
    Thanks
    Rakesh

    tbd wrote:
    Use the POINTER Luke Nathan!
    Seriously, the Pointer is the right method.
    Other things to check: If the DLL wants a Zero-terminated string/buffer, you may have to add a zero-byte to the end of the input [U8] array.  Make sure Length is wired and equals the input array-length.  I'm guessing Length should be passed by Value!(?)  Also, if reading-back a string (or array) then you'll (probably) have to pass-in a string/array at least as big as the result is supposed to be (just fill it with zeros.)
    And if it still doesn't work, we're still missing something simple (like an incorrect datatype or calling-convention or broken DLL? .)
    ... and, thank you for backing me up, TonP!  
    Message Edited by tbd on 01-12-2007 12:47 AM
    Since the DLL function also wants the buffer length I doubt that it is expecting a zero termination character. But who knows! Maybe the OP misunderstands the function documentation (has he read that at all?).
    If you really need zero termination you can do that yourself or just pass the string as string and configure the Call Library Node parameter to be a String too and use the C style String pointer type there. LabVIEW will take care to append a zero byte before passing the string pointer and if you also wire the output side of that parameter copy the contents from that pointer back into a string handle up to the first zero byte. It is obvious from this that a string buffer is not the right thing to pass to a CLN in LabVIEW if that buffer can legally contain zero bytes too. 
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Need to get the production order by inputting Material number and serial no

    Hi Experts,
    I have material number and serial number . All I need is PRODUCTION ORDER number.
    Can any one give the table joints for that ?
    Thanks,
    Koya.

    hai check this code.. similar req:
    REPORT z_so_info.
    TABLES: vbak, vbap, afko, afpo.
    *Field catalog
    TYPE-POOLS: slis.
    DATA: lv_repid TYPE sy-repid VALUE sy-repid,
    xfield TYPE slis_t_fieldcat_alv,
    afield TYPE slis_fieldcat_alv.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(25) text-002.
    SELECT-OPTIONS: so_so FOR vbak-vbeln OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
    PARAMETERS:
    p_kunnr LIKE vbak-kunnr, " sold-to
    p_kunwe LIKE vbak-kunnr. " ship-to
    SELECTION-SCREEN END OF BLOCK b2.
    *Constants
    CONSTANTS: c_zor TYPE vbak-auart VALUE 'ZOR',
    c_we TYPE vbpa-parvw VALUE 'WE',
    c_ag TYPE vbpa-parvw VALUE 'AG'.
    * c_space TYPE space.
    *Ranges
    RANGES: ra_parvw FOR vbpa-parvw,
    ra_kunnr FOR vbpa-kunnr.
    *Tables
    DATA: BEGIN OF gt_output OCCURS 0,
    vbeln LIKE vbak-vbeln, " sales order number
    posnr LIKE vbap-posnr, " SO item number
    matnr LIKE vbap-matnr, " material number
    sh LIKE vbpa-kunnr, " Ship-to
    sp LIKE vbpa-kunnr, " Sold-to
    lifnr LIKE ekko-lifnr, " Vendor
    bstnk LIKE vbak-bstnk, " PO number
    banfn LIKE vbep-banfn, " Purchase requi
    po_st TYPE char30, " PO status text
    pstyv TYPE vbap-pstyv, " Item catagory
    aufnr LIKE afpo-aufnr, " Production Order
    prd_stat TYPE string, " Prd order status
    END OF gt_output.
    DATA: wa_output LIKE gt_output.
    FIELD-SYMBOLS: <fs_output> LIKE gt_output.
    *Table for sales order and PO
    TYPES : BEGIN OF gs_data,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    pstyv TYPE vbap-pstyv,
    matnr TYPE vbap-matnr,
    END OF gs_data.
    DATA: gt_data TYPE STANDARD TABLE OF gs_data,
    wa_data TYPE gs_data.
    *Table for Production Orders
    TYPES: BEGIN OF gs_prd,
    aufnr TYPE afpo-aufnr,
    posnr TYPE afpo-posnr,
    kdauf TYPE afpo-kdauf,
    kdpos TYPE afpo-kdpos,
    wepos TYPE afpo-wepos, "Goods Receipt Indicator
    elikz TYPE afpo-elikz, "Delivery Completed Indicator
    objnr TYPE aufk-objnr, "Object number
    * getri TYPE afko-getri, "Confirmed Order Finish Date
    * gltri TYPE afko-gltri, "Actual finish date
    END OF gs_prd.
    DATA: gt_prd TYPE STANDARD TABLE OF gs_prd,
    wa_prd TYPE gs_prd.
    *Table for partner data
    TYPES: BEGIN OF gs_partner,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    parvw TYPE vbpa-parvw,
    kunnr TYPE vbpa-kunnr,
    END OF gs_partner.
    DATA: gt_partner TYPE STANDARD TABLE OF gs_partner,
    wa_partner TYPE gs_partner.
    TYPES: BEGIN OF gs_po,
    ebeln TYPE ekkn-ebeln,
    ebelp TYPE ekkn-ebelp,
    vbeln TYPE ekkn-vbeln,
    vbelp TYPE ekkn-vbelp,
    END OF gs_po.
    DATA: gt_po TYPE STANDARD TABLE OF gs_po,
    wa_po TYPE gs_po.
    TYPES: BEGIN OF gs_preq,
    vbeln TYPE vbep-vbeln,
    posnr TYPE vbep-posnr,
    banfn TYPE vbep-banfn,
    END OF gs_preq.
    DATA: gt_preq TYPE STANDARD TABLE OF gs_preq,
    wa_preq TYPE gs_preq.
    TYPES: BEGIN OF gs_po_stat,
    ebeln TYPE ekko-ebeln,
    procstat TYPE ekko-procstat,
    lifnr TYPE ekko-lifnr,
    END OF gs_po_stat.
    DATA: gt_po_stat TYPE STANDARD TABLE OF gs_po_stat,
    wa_po_stat TYPE gs_po_stat.
    *Field symbols
    FIELD-SYMBOLS: <fs> TYPE tj02t-txt04,
    <fs_temp> TYPE tj02t-txt04,
    <fs_stat> TYPE char30.
    START-OF-SELECTION.
    PERFORM fr_build_range.
    PERFORM fr_get_data.
    PERFORM fr_build_fc.
    PERFORM fr_output.
    *& Form fr_get_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_get_data.
    *Get SO
    SELECT a~vbeln a~posnr a~pstyv a~matnr
    FROM vbap AS a
    JOIN vbak AS b
    ON a~vbeln = b~vbeln
    JOIN vbpa AS c
    ON b~vbeln = c~vbeln
    INTO TABLE gt_data
    WHERE b~vbeln IN so_so
    AND b~auart EQ c_zor "Only Sales Orders
    AND c~kunnr IN ra_kunnr. "from selection screen
    DELETE ADJACENT DUPLICATES FROM gt_data COMPARING vbeln posnr.
    *get data of the production order
    IF NOT gt_data[] IS INITIAL.
    SELECT a~aufnr a~posnr a~kdauf a~kdpos a~wepos a~elikz
    b~objnr
    FROM afpo AS a
    JOIN aufk AS b
    ON a~aufnr = b~aufnr
    INTO TABLE gt_prd
    FOR ALL ENTRIES IN gt_data
    WHERE a~kdauf EQ gt_data-vbeln
    AND a~kdpos EQ gt_data-posnr.
    ENDIF.
    *Get partner data
    IF NOT gt_data[] IS INITIAL.
    SELECT vbeln posnr parvw kunnr
    FROM vbpa
    INTO TABLE gt_partner
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln.
    ENDIF.
    *Get Purchase Order
    IF NOT gt_data[] IS INITIAL.
    SELECT ebeln ebelp vbeln vbelp
    FROM ekkn
    INTO TABLE gt_po
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND vbelp EQ gt_data-posnr.
    SELECT vbeln posnr banfn
    FROM vbep
    INTO TABLE gt_preq
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND posnr EQ gt_data-posnr.
    ENDIF.
    IF NOT gt_po[] IS INITIAL.
    SELECT a~ebeln a~procstat a~lifnr
    FROM ekko AS a
    JOIN ekpo AS b
    ON a~ebeln = b~ebeln
    INTO TABLE gt_po_stat
    FOR ALL ENTRIES IN gt_po
    WHERE b~ebeln EQ gt_po-ebeln
    AND b~ebelp EQ gt_po-ebelp.
    ENDIF.
    *Move data to output table
    LOOP AT gt_data INTO wa_data.
    wa_output-vbeln = wa_data-vbeln.
    wa_output-posnr = wa_data-posnr.
    wa_output-pstyv = wa_data-pstyv.
    wa_output-matnr = wa_data-matnr.
    READ TABLE gt_po INTO wa_po WITH KEY vbeln = wa_data-vbeln
    vbelp = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-bstnk = wa_po-ebeln.
    READ TABLE gt_po_stat INTO wa_po_stat WITH KEY ebeln = wa_po-ebeln.
    IF sy-subrc EQ 0.
    wa_output-lifnr = wa_po_stat-lifnr.
    CASE wa_po_stat-procstat.
    WHEN '01'.
    wa_output-po_st = 'Version in process'.
    WHEN '02'.
    wa_output-po_st = 'Active'.
    WHEN '03'.
    wa_output-po_st = 'In release'.
    WHEN '04'.
    wa_output-po_st = 'Partially released'.
    WHEN '05'.
    wa_output-po_st = 'Released Completely'.
    WHEN '08'.
    wa_output-po_st = 'Rejected'.
    ENDCASE.
    ENDIF. "inner read subrc
    ENDIF. "outer read subrc
    READ TABLE gt_preq INTO wa_preq WITH KEY vbeln = wa_data-vbeln
    posnr = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-banfn = wa_preq-banfn.
    ENDIF.
    READ TABLE gt_prd INTO wa_prd WITH KEY kdauf = wa_data-vbeln
    kdpos = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-aufnr = wa_prd-aufnr.
    *get the purchase requisition for production order as well
    SELECT SINGLE banfn
    FROM ebkn
    INTO wa_output-banfn
    WHERE aufnr EQ wa_prd-aufnr.
    *Get the status of the production order
    PERFORM fr_get_prd_stat USING wa_prd-objnr
    CHANGING wa_output-prd_stat.
    ENDIF. " sy-subrc
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_we.
    IF sy-subrc EQ 0.
    wa_output-sh = wa_partner-kunnr.
    ENDIF.
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_ag.
    IF sy-subrc EQ 0.
    wa_output-sp = wa_partner-kunnr.
    ENDIF.
    APPEND wa_output TO gt_output.
    CLEAR: wa_data, wa_prd,wa_partner,wa_output.
    ENDLOOP.
    ENDFORM. " fr_get_data
    *& Form fr_build_range
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_build_range .
    *Range for partner function
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SH' TO ra_parvw-low. " we
    APPEND ra_parvw.
    CLEAR ra_parvw.
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SP' TO ra_parvw-low. " ag
    APPEND ra_parvw.
    CLEAR ra_parvw.
    *Range for ship-to and sold-to
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunnr TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunwe TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    ENDFORM. " fr_build_range
    *& Form fr_build_fc
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_build_fc .
    * sales order number
    afield-fieldname = 'VBELN'.
    afield-seltext_s = 'Sales #'.
    afield-ref_tabname = 'VBAK'.
    APPEND afield TO xfield. CLEAR afield.
    * sales ITEM number
    afield-fieldname = 'POSNR'.
    afield-seltext_s = 'Item #'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    * Material Number
    afield-fieldname = 'MATNR'.
    afield-seltext_s = 'Material #'.
    afield-ref_tabname = 'VBAP'.
    afield-outputlen = 10.
    APPEND afield TO xfield. CLEAR afield.
    *Vendor Number
    afield-fieldname = 'LIFNR'.
    afield-seltext_s = 'Vendor Num.'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    * ship-to-party
    afield-fieldname = 'SH'.
    afield-seltext_s = 'Ship-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    * sold-to-party
    afield-fieldname = 'SP'.
    afield-seltext_s = 'Sold-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    *PO number
    afield-fieldname = 'BSTNK'.
    afield-seltext_s = 'PO NUM'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PO status
    * afield-fieldname = 'PO_STAT'.
    * afield-seltext_s = 'Step'.
    * afield-ref_tabname = 'zbacklog_v2'.
    * APPEND afield TO xfield. CLEAR afield.
    *PO step status
    afield-fieldname = 'PO_ST'.
    afield-seltext_s = 'PO.Status'.
    afield-ref_tabname = 'zbacklog_v2'.
    APPEND afield TO xfield. CLEAR afield.
    *Purchase requisition
    afield-fieldname = 'BANFN'.
    afield-seltext_s = 'Pur. Req.'.
    afield-ref_tabname = 'VBEP'.
    APPEND afield TO xfield. CLEAR afield.
    *Item catagory
    afield-fieldname = 'PSTYV'.
    afield-seltext_s = 'Itm. Catg'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    *Prodcution Order number
    afield-fieldname = 'AUFNR'.
    afield-seltext_m = 'Prod.Order'.
    afield-ref_tabname = 'AFKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PRODCUTION status
    afield-fieldname = 'PRD_STAT'.
    afield-seltext_s = 'Prd. Step'.
    afield-ref_tabname = 'zbacklog_v2'.
    afield-outputlen = 20.
    APPEND afield TO xfield. CLEAR afield.
    *PRODUCTION step status
    * afield-fieldname = 'PRD_ST'.
    * afield-seltext_s = 'Prd. Status'.
    * afield-ref_tabname = 'zbacklog_v2'.
    * APPEND afield TO xfield. CLEAR afield.
    ENDFORM. " fr_build_fc
    *& Form fr_output
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_output .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    * I_CALLBACK_PF_STATUS_SET = ' '
    * I_CALLBACK_USER_COMMAND = ' '
    * I_STRUCTURE_NAME =
    * IS_LAYOUT =
    it_fieldcat = xfield[]
    i_default = 'X'
    i_save = 'A'
    TABLES
    t_outtab = gt_output
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDFORM. " fr_output
    *& Form fr_get_prd_stat
    * text
    * -->P_WA_PRD_OBJNR text
    FORM fr_get_prd_stat USING p_objnr CHANGING p_prd_stat.
    DATA: lt_status TYPE STANDARD TABLE OF jstat,
    wa_status TYPE jstat,
    lv_status TYPE tj02t-txt04,
    lv_temp2 TYPE char5,
    lv_buff TYPE string.
    CALL FUNCTION 'STATUS_READ'
    EXPORTING
    client = sy-mandt
    objnr = p_objnr
    only_active = 'X'
    TABLES
    status = lt_status
    EXCEPTIONS
    object_not_found = 1
    OTHERS = 2.
    LOOP AT lt_status INTO wa_status.
    IF wa_status-stat(1) EQ 'I'.
    SELECT txt04 FROM tj02t
    INTO lv_status
    WHERE istat EQ wa_status-stat
    AND spras EQ 'E'.
    ENDSELECT.
    lv_temp2 = lv_status.
    CONCATENATE lv_temp2 p_prd_stat INTO p_prd_stat
    SEPARATED BY ','.
    ENDIF.
    CLEAR: wa_status, lv_status, lv_temp2.
    ENDLOOP.
    lv_buff = p_prd_stat.
    *Status of Production Order
    IF lv_buff CS 'CRTD'.
    p_prd_stat = 'Not Active'.
    ENDIF.
    IF lv_buff CS 'REL'.
    IF lv_buff CS 'GMPS'.
    p_prd_stat = 'Printed In Prod'.
    ELSE.
    p_prd_stat = 'Printed'.
    ENDIF.
    ENDIF.
    IF lv_buff CS 'TECO'.
    p_prd_stat = 'Technically Compt.'.
    ENDIF.
    ENDFORM. " fr_get_prd_stat

  • Copy the Purchase Order

    Dear Sapiens,
    I want to Copy one PO into new one.
    I know  that I can enter the PO No & line item in Item overview.However,here I have to enter each line item.
    Suppose there are 100 line item in one PO,So Can I Copy the whole PO into new one without entering any line item.
    Best Regards
    Deepak Rade

    Hi,
    To be able to copy complete purchase orders, you must set up the document overview.
    Please go thru this pictorial link: [Creating a Purchase Order by Referencing Another (PO) Document|http://help.sap.com/saphelp_470/helpdata/en/87/3a8f70d49c11d3b58a006094b9476a/content.htm]
    Hope this helps!
    Reetesh
    Edited by: Reetesh on Dec 16, 2011 6:17 AM

Maybe you are looking for

  • Trying to understand tnfdump log

    Hi, I am tracing a pthread and socket program to see where the bottleneck is as it is slow. However I am not sure which value to use for the tracing of the program. This is my tnfdump log Here should I be using the Elapsed(ms) or Delta(ms). Is the el

  • IPhone New features/Hardware request

    Now that we have an Iphone that is essentially a personal computer, can we have additional peripherals such as a external keyboard and monitor etc We could then get some proper word-processing, spreadsheet etc software and actually use it in the offi

  • Web Form Error

    I'm having a promblem on our simple quick contact form We are getting this when submitting... but before it was ok ERROR: An error occurred while processing credit card here's the link to our site http://www.jdteterlaw.com/ test the rRequest Consult

  • Pop up error

    when i plug in my ipod it has a pop up error that says "This Ipod cannot be used because the Apple mobile device is not started. How do I fix this problem?

  • [SOLVED] Pacman is unable to look up keys?

    Hi there, I'm using Arch Linux for a while, and I'm using pacman 4.0 as well as key signing. It works without any problems, and I run system upgrades every 3 days or so. Today i just want to initiate the upgrade with "pacman -Syu" as usual, but pacma