Edit Internal Table for Sales Order Smartform (Y640_SDORC_A)

I want to modify SmartForm Y640_SDORC_A so I always print the net value and discount percentage.
I have an access sequence and my discount can be created by a discount percentage condition (ZD00) or by Special Price (PR01) condition.
My problem is that if I use the Special Price Condition the Internal Table where the smartform loops to get the price only gets the Net Value amount, and it wont print the discount percentage, but if I dont use the Special Price condition the internal value has 2 rows the first one is for Discount Condition and the second for Net Value and it prints correctly.
This is how my access secuence is arranged, the X are the print id column:
PR00 Price
ZD00 Discount      (X)
PR01 Special Price
--- Net Value    (X)
How can I fix the internal table creation so when there is a Special Price Condition (PR01) the internal table also gets the Discount percentage value.
Here is my Forms Code:
*&      Form  GET_ITM_PRICE_TABLE
FORM get_itm_price_table
USING
is_vbdpa             TYPE vbdpa
is_vbdka             TYPE vbdka
iv_price_print_mode  TYPE c
iv_spras             TYPE spras
CHANGING
ct_komv              TYPE t_komv_tab
ct_komvd             TYPE t_komvd_tab
cs_komk              TYPE komk.
  DATA ls_komp TYPE komp.
  DATA ls_komk TYPE komk.
*  DATA lt_tkomv  TYPE STANDARD TABLE OF komv.
  IF ls_komk-knumv NE is_vbdka-knumv OR
  ls_komk-knumv IS INITIAL.
    CLEAR ls_komk.
    ls_komk-mandt = sy-mandt.
    ls_komk-kalsm = is_vbdka-kalsm.
    ls_komk-kappl = 'V'.
    ls_komk-waerk = is_vbdka-waerk.
    ls_komk-knumv = is_vbdka-knumv.
    ls_komk-knuma = is_vbdka-knuma.
    ls_komk-vbtyp = is_vbdka-vbtyp.
    ls_komk-land1 = is_vbdka-land1.
    ls_komk-vkorg = is_vbdka-vkorg.
    ls_komk-vtweg = is_vbdka-vtweg.
    ls_komk-spart = is_vbdka-spart.
    ls_komk-bukrs = is_vbdka-bukrs_vf.
    ls_komk-hwaer = is_vbdka-waers.
    ls_komk-prsdt = is_vbdka-erdat.
    ls_komk-kurst = is_vbdka-kurst.
    ls_komk-kurrf = is_vbdka-kurrf.
    ls_komk-kurrf_dat = is_vbdka-kurrf_dat.
  ENDIF.
  ls_komp-kposn = is_vbdpa-posnr.
  ls_komp-kursk = is_vbdpa-kursk.
  ls_komp-kursk_dat = is_vbdpa-kursk_dat.
  IF is_vbdka-vbtyp CA 'HKNOT6'.
    IF is_vbdpa-shkzg CA ' A'.
      ls_komp-shkzg = 'X'.
    ENDIF.
  ELSE.
    IF is_vbdpa-shkzg CA 'BX'.
      ls_komp-shkzg = 'X'.
    ENDIF.
  ENDIF.
  IF iv_price_print_mode EQ 'A'.
    CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
      EXPORTING
        comm_head_i = ls_komk
        comm_item_i = ls_komp
        language    = iv_spras
      IMPORTING
        comm_head_e = ls_komk
        comm_item_e = ls_komp
      TABLES
        tkomv       = ct_komv
        tkomvd      = ct_komvd.
  ELSE.
    CALL FUNCTION 'RV_PRICE_PRINT_ITEM_BUFFER'
      EXPORTING
        comm_head_i = ls_komk
        comm_item_i = ls_komp
        language    = iv_spras
      IMPORTING
        comm_head_e = ls_komk
        comm_item_e = ls_komp
      TABLES
        tkomv       = ct_komv
        tkomvd      = ct_komvd.
  ENDIF.
  cs_komk = ls_komk.
ENDFORM.                    "get_itm_price_table
Regards,
Carlos

Turns out this can be done modifiying access sequence.
Carlos

Similar Messages

  • Table for Sales order Cost Est?

    Cost estimate data for sales orders used to be kept in KEKO and KEPH -
    Now that we've upgrade to 5.0 - there are only product cost estimates.
    Anybody know the tables for sales orders?
    thanks

    Dear Althea,
    please check with this tables.
    VBAG                           Sales Document: Release Data by Schedule Line in Sch.Agrmt.
    VBAK                           Sales Document: Header Data                               
    VBAP                           Sales Document: Item Data                                 
    VBBE                           Sales Requirements: Individual Records                    
    VBBS                           Sales Requirement Totals Record                           
    VBDATA                         Update data      
    Regards
    Mangal.

  • Table for Sales Order BOM

    Hello Friends,
    I would like to know the database table which stores Sales Order BOM details.
    Actually I want to print the BOM Header Text in my output smartform. For this, I am using the below data.
    Language : EN
    Text Id     : KZU
    Text Object : BOM
    Text name : Combination of SY-MANDT 'K' and BOM in transaction CS62.
    I dont know from where should i pick up this BOM Number.
    Thanks,
    Salil

    Hi
    check the tables <b>STPO and STKO</b>
    you may find the BOM number for sales order
    also use the Table <b>KDST</b> to link the Sales order to BOM
    and also use the table <b>MAST</b> to find the link to MATERIAL BOM by taking the sales order material
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala
    Message was edited by:
            Anji Reddy Vangala

  • Fetch Vat and Octroi value for Sales Order Smartform .

    Hi all ,
    I am using a copy of /SMB40/SDORC_A smartform for sales order creation . I have to pass the vat and octroi of individual item as well as on the final total and then give the final bill amount . Can anyone please tell bewhich fields should i use and which areas do i need to do the changes in the smartform.

    Hi Disha,
    From the billing number VBRK-VBELN, pick the value of VBRK-KNUMV and pass this to KONV-KNUMV and display the value of KONV-KWERT against KSCHL
    Regards..
    Palaniayppan subbiah

  • Tables for Sales Order,Delivery Doc, Billing Doc

    Hello All,
    Can anyone list the tables that are relevant for Sales Order,Delivery, Billing-Header,Item,Schedule line level as applicable.
    Regards,
    Raj

    Hi Raja Sekhar,
    Customers
             KNA1   General Data
                      KNB1   Customer Master – Co. Code Data (payment method, reconciliation acct)
                      KNB4   Customer Payment History
                      KNB5   Customer Master – Dunning info
                      KNBK   Customer Master Bank Data
                      KNKA   Customer Master Credit Mgmt.
                      KNKK   Customer Master Credit Control Area Data (credit limits)
                      KNVV   Sales Area Data (terms, order probability)
                      KNVI   Customer Master Tax Indicator
                      KNVP   Partner Function key
                      KNVD   Output type
                      KNVS   Customer Master Ship Data
                      KLPA   Customer/Vendor Link
    Sales Documents  
    VBAKUK VBAK + VBUK
                      VBUK   Header Status and Administrative Data
                      VBAK   Sales Document - Header Data
                      VBKD   Sales Document - Business Data
                      VBUP   Item Status
                      VBAP   Sales Document - Item Data
                      VBPA   Partners
                      VBFA   Document Flow
                      VBEP   Sales Document Schedule Line
                      VBBE   Sales Requirements: Individual Records
    SD Delivery Documets
    LIPS   Delivery Document item data, includes referencing PO
                      LIKP   Delivery Document Header data
    Billing Document 
    VBRK   Billing Document Header
                      VBRP   Billing Document Item
    SD Shipping Unit 
    VEKP   Shipping Unit Item (Content)
                      VEPO   Shipping Unit Header
    REWARD POINTS IF HELPFUL
    Regards
    Sai

  • C form Details table for sales order

    Hi Experts,
    What is the tsble for C form details in a sales order.
    Thanks,
    Anu

    Hi,
    The tcode for maintaing C form for sales orders is J1IUN. The table is J_1IFRDTSO.
    You can find J1IUN Under area menu J1ILN - India Localization Menu.
    Regards,
    Vinod

  • Table for sales order change by field

    Dear Friends,
    I want to get the data @ table level for the list of sales orders with changed by field. Can you please tell which table/s for sales order change by field can be used?
    Thanks,
    pinky

    Hi
    You can get the changes for SALES ORDER item in CDPOS table
    Goto SE16 and find the changes.
    hope it will serve your purpose.
    thanks,
    santosh

  • Avoiding Z-table and having a global internal table during Sales Order

    Hi All,
    I have a requirement like this.
    1. In the R/3 system I am creating Sales order.
    2. For each line item, it will call APO system to check the availability of the materials and the informaiton is returned back to
    R/3 system.
    3. As the soon as the informaiton is recieved in R/3 system, we found one enhancement point and this informaiton is being captured now in a Z-table to do some processing while saving the order after processing all the line items
    4. I wanted to avoid the Z-table and want to have some global internal table which will be available till the end of the processing of the sales order.
    Solution I am thinking of:
    1. One option could be creating a global internal table in SAPMV45A program in one of the enhancement points in the TOP declaration. But, that global internal table is not accessible in the enhancement point where I wanted to store the information. Because, I am actually updating the table in a FM.
    2. Export it to memory and import it when needed. But, how to update the informaiton in this intenal table(which is in memory) for every line item
    Please guide me. Any help on this would be highly appreciated.
    Thanks,
    Babu Kilari

    >
    Babu Kilari wrote:
    >  Solution I am thinking of:
    >
    > 1. One option could be creating a global internal table in SAPMV45A program in one of the enhancement points in the TOP declaration. But, that global internal table is not accessible in the enhancement point where I wanted to store the information. Because, I am actually updating the table in a FM.
    >  Babu Kilari
    If you are updating this table in a FM, you can always add one tables parameter to the function ( if it is a custom function) and pass the globally declared internal table to the function call in the user exit update the table in the FM and when the end function is reached, you will have the updated internal table again at the user exit after the function call.
    Imp- Declare your internal table in MV45ATZZ.
    KR,
    Advait
    Edited by: Advait Gode on Aug 6, 2009 8:16 AM

  • Table for Sales Order Pending Qty.

    Hi All,
    I need a Table from which I can extract the pending qty (Qty
    Still to be delivered)with material code of all open sales
    order. I need this for Reporting purpose. This report is for
    pending qty so by refering this report I can forward my
    requirement to production.
    Thanks in Advance.
    Regards
    Mahendra

    Hi:
    I think you are looking for a back order report - we developed a custom report.  I think on the production side, there should be a list of parts to be make.  On the sales side, you could try VA05 and select open orders
    Or even try Logistics > Production > MRP > Environment....there are options there
    Try Tcode CO24
    Let me know how this turned out

  • How to update SIS Structure S503 table for Sales Order

    Hi All,
    I have a requirement where i want to restrict S503 table getting updated for an Item Category. Can somebody please help me in this.
    Complete scenario:
    I am splitting Sales Order line item into multiple Sub Line items based on batch determination. So for a line item 10 in Sales Order having ordered quantity 1000 i have 2 more sub line items 101 and 102 based on 2 available batches having 500 quantites each. When Sales Order is saved S503 have 1 entry for SO created but the ordered and confirmed quantity is doubled as it is picking it from main line item 10 as well as from 101 and 102.
    Is there any way to restrict the main line item entry quantity from getting in to SIS structures.
    Thanks,
    Sudhir.

    Hi,
    There is a change in the requirement.
    Scenario:
    I have created a sales order with some 4 condition types, in that 2 condition types are of class A & B and the other two is of class C. Here I need to update the condition price of class A & B only and the remaining condition types should not get update even though there is an updated price is available.
    For the above scenario, I need to write a standalone program. Do we have any function modules to update the price of the single condition in the sales order? Please tell me how we can update the sales order at item condition level.
    Thanks.
    Balaram

  • VBBE Table for Sales Order Open Quantity......

    Hi Experts,
    In VBBE Table I found sales Order Open Quantity but Some of the Materials are not showing in this VBBE table which are still pending (Open).
    What may the reason.
    Yusuf

    Hi CHR,
    In S001 table i found related material open qty. but there is no link with vbeln posnr and etenr (schedule date). Only Customer Code (Kunr) is available.
    This is no use for me for making report.
    Yusuf

  • Table for sales order with incoterms

    Hi all,
    In which table can i get sales orders with incoterms details.
    In VBAK and VBAP it is not available
    Regards'
    Mano

    > In which table can i get sales orders with incoterms details.
    >
    > In VBAK and VBAP it is not available
    Hi,
    Go to SE16, and type the table name as VBKD. This is the table where all the inco term details are given.
    In the new screen, against VBELN, give the sales document numbers for which you want the inco term details and then click on execute.
    You will get the info you require.
    Hope you find it useful.
    Regards,
    Swapna

  • Pricing condition tables for Sales Order

    Hi experts,
    please can you tell me the code I have to write into a query's field to retrive the value of a specific header pricing condition saved into a Sales Order?
    Thank you very much
    Kind Regards
    Andrea

    1) From sale order header table VBAK fetch the condition number KNUMV for a particular sale order VBELN.
    2) From conditions table KONV fetch the conditions for condition number KNUMV with item number POSNR as 000000.
    This way you can fetch the header conditions. Our ABAPers normally do a loop on the line items and total up the values to arrive at the header condition value. If you use this way then you need to pass another field condition origin KHERK with value D while fetching data from KONV.
    Regards,
    GSL.

  • Conditions KONV table for Sales order Line item.

    Hi Friends,
    What are the key fields bw vbap and konv table.
    requirmnt is : need to fetch conditions ( from KONV table ) for the sale order line items.
    thanks in advance.
    Jai.

    Hi,
    1. Fetch field <b>KNUMV</b> from table <b>VBAK</b> for that particular Sales Order No i.e <b>VBELN</b>.
    2. Goto <b>KONV</b> & based on <b>KNUMV</b>, <b>KPOSN</b> and <b>KSCHL</b> (condition type), fetch the required condition details along with its net price (KONV-KBETR)  and net value (KONV-KWERT).
    KONV-KPOSN = '00000' -> Header Condition
    KONV-KPOSN = '00001' -> VBAP-POSNR = 10
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • Table for Sales Order Header Text

    Hi,
    I want Table Name for Sales Data -> Header Text.
    Path--
    When we open the Sales order, Click on Display Document Header Details --> Here select the Text tab. Here, see the written text in Form Header (1st option).
    I want that table Name which contain the Header Text. Because If header text is more than 1 line, where it stores??
    Plz. help

    Hi,
    Text data are stored in tables STXH (Header) and STXL(Item).
    But you can't find the exact text in these tables as the text are stored in binary form.
    You need to use function module READ_TEXT to read any document texts.
    Check the link [Use FM READ_TEXT to Read the Various Text|http://www.sap-img.com/abap/use-fm--read-text-to-read-the-various-text.htm] which explains how to use this module to read the text.
    Regards,

Maybe you are looking for

  • Can we add new logical system in Entitlement tab in SAP Authentication.

    Hi , We already Installed and configured sap integration kit and every thing works fine. My question is as of now we connected our sap BW Dev system  to BOBJ but we would like to connect to BW Prod System to same BOBJ System. What are the steps we ne

  • How do you surf the web while you are on the iphone?

    How do you search the web while you are having a phone conversation? do you have to put the phone on speaker?

  • Powerbook wont startup and have no install disks

    My powerbook G4 starts up installs lots of extensions until it announces that it is "waiting for Apple file service" and then stops. I am fairly sure that I didnt get any install disks when i bought it (long time ago now) because all the software was

  • Measurement Unit PC has no ISO code

    Hello,                I am trying to upload PML messages into AII from The test tool. The messages are stuck into the queue with the Error Message as mentioned in the Subject. I have defined the ISO code for the PC UOM but still I am unable to resolv

  • Can't download on a Mac

    Im trying to download CS5 on to my Mac and the only file download options I get are .exe or .7z instead of the .dmg. How do I get a download file with the .dmg?