How we know tables for komv, komk, komp structures in ME23n Trans for PO

Hi gurus,
We are extracting data of PO relating to me23n and sending that data to XI. Its working fine. But some fields value are getting wrong. I am getting problem with komv, komk, and komp structures, bcoz i dont know which tables i have to use. I am using konv right now.
Pls give some suggestions.
and also how we get netwr value in the header i.e. total amout of items and price element rate KOMV-KBETR in header.
ex: KOMV-KBETR
     KOMK-WAERK
     KOMP-NETWR
     TDTEXT based on ID
     ZTEXT (item level text, and header level text).
Thanks in advance...

Pls see my code...
*This for Header.............*
      i_zzep_pohdr_s-doc_date = i_ekko-bedat.    "14
      SELECT SINGLE * FROM t052 INTO i_t052 WHERE zterm = i_ekko-zterm.
      IF sy-subrc = 0.
        i_zzep_pohdr_s-pay_trms = i_t052-zterm.     "15
      ENDIF.
      SELECT SINGLE * FROM tcurc INTO i_tcurc WHERE waers = i_ekko-waers.
      IF sy-subrc = 0.
        i_zzep_pohdr_s-curr = i_tcurc-waers.     "16
      ENDIF.
      i_zzep_pohdr_s-ex_rate = i_ekko-wkurs.     "17
      i_zzep_pohdr_s-ex_rate_fxd = i_ekko-kufix. "18
      i_zzep_pohdr_s-inco = i_ekko-inco1.        "19
      i_zzep_pohdr_s-add_inco = i_ekko-inco2.    "20
      SELECT SINGLE * FROM t685t INTO i_t685t
      WHERE spras = i_ekko-spras.
      IF sy-subrc = 0.
        i_zzep_pohdr_s-pri_ele_cond_desc = i_t685t-vtext. "21
      ENDIF.
      SELECT SINGLE * FROM konv INTO i_konv WHERE knumv = i_ekko-knumv.
      IF sy-subrc = 0.
        IF i_konv-kschl = 'PBXX'.
*          i_zzep_pohdr_s-Pri_ele_rate = i_konv-kbetr.                "22
          i_zzep_pohdr_s-pri_ele_curr_cond = i_konv-waers.           "23
          i_zzep_pohdr_s-pri_ele_cond_val_doc_curr = i_konv-kwert_k. "24
        ENDIF.
      ENDIF.
      MOVE i_ekko-ebeln TO xname.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
*   CLIENT                        = SY-MANDT
          id                            = 'F02'
          language                      = sy-langu
          name                          = xname
          object                        = 'EKKO'
*   ARCHIVE_HANDLE                = 0
*   LOCAL_CAT                     = ' '
* IMPORTING
*   HEADER                        =
        TABLES
          lines                         = i_xtline
   EXCEPTIONS
     id                            = 1
     language                      = 2
     name                          = 3
     not_found                     = 4
     object                        = 5
     reference_check               = 6
     wrong_access_to_archive       = 7
     OTHERS                        = 8
      IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        CLEAR temp.
        LOOP AT i_xtline INTO rline.
          IF rline-tdline IS NOT INITIAL.
            CONCATENATE temp rline-tdline INTO temp SEPARATED BY space.
          ENDIF.
        ENDLOOP.
        MOVE temp TO i_zzep_pohdr_s-hdr_lvl_txt_cont . "28
      ENDIF.
      SELECT SINGLE * FROM t166k INTO i_t166k WHERE bsart = i_ekko-bsart.
      IF sy-subrc = 0.
        i_zzep_pohdr_s-hdr_lvl_txt_id = i_t166k-tdid.            "26
      ENDIF.
      SELECT SINGLE * FROM t166k INTO i_t166k WHERE bsart = i_ekko-bsart.
      IF sy-subrc = 0.
        SELECT SINGLE * FROM ttxot INTO i_ttxot WHERE tdobject = i_t166k-tdobject
                                                AND tdspras = i_ekko-spras.
        IF sy-subrc = 0.
          i_zzep_pohdr_s-hdr_lvl_txt_desc_id = i_ttxot-tdtext. " 27
        ENDIF.
      ENDIF.
      APPEND i_zzep_pohdr_s TO t_zzep_pohdr_t.
    ENDLOOP.
*This for Items.............*
SELECT * FROM t166p INTO TABLE i_t166p WHERE bstyp = i_ekpo-bstyp
                                              AND pstyp = i_ekpo-pstyp.
      IF sy-subrc = 0.
        LOOP AT i_t166p INTO wa_t166p.
          IF wa_t166p-tdid = 'F01'.
            i_zzep_podet_s-itm_lvl_txt_id = wa_t166p-tdid.            "29
          ENDIF.
        ENDLOOP.
        SELECT SINGLE * FROM ttxot INTO i_ttxot WHERE tdobject = 'EKPO'
                                                AND tdspras = sy-langu.
        IF sy-subrc = 0.
          i_zzep_podet_s-itm_lvl_txt_desc_id = i_ttxot-tdtext. " 27
        ENDIF.
      ENDIF.
*select single * from stxl into i_stxl where tdspras = i_ekko-spras.
*select single * from
      APPEND i_zzep_podet_s TO t_zzep_podet_t.
      sum = sum + i_zzep_podet_s-pri_ele_net_val_doc_curr.
      CLEAR i_zzep_podet_s.
    ENDLOOP.
    CLEAR current_line.
    LOOP AT t_ekko INTO i_ekko.
      current_line = sy-tabix.
      LOOP AT t_ekpo INTO i_ekpo WHERE ebeln = i_ekpo-ebeln.
        IF sy-subrc = 0.
          *MOVE sum TO i_zzep_pohdr_s-pri_ele_net_val_doc_curr.* (NETWR)
          *MOVE sum TO i_zzep_pohdr_s-pri_ele_rate.* (KBETR)
        ENDIF.
      ENDLOOP.
      MODIFY t_zzep_pohdr_t FROM i_zzep_pohdr_s INDEX current_line.
    ENDLOOP.
  ENDIF.
I already down althose wht u suggested previous...
just see this code and give suggestion where i have to change my code....
I am getting doubt when i am using ..
IF i_konv-kschl = 'PBXX'.
            i_zzep_podet_s-pri_ele_rate = i_zzep_podet_s-ext_val_itm.                "25
            i_zzep_podet_s-pri_ele_curr_cond = i_konv-waers.           "26
            i_zzep_podet_s-pri_ele_cond_val_doc_curr = i_konv-kwert_k. "27
          ENDIF.
and..
CLEAR current_line.
    LOOP AT t_ekko INTO i_ekko.
      current_line = sy-tabix.
      LOOP AT t_ekpo INTO i_ekpo WHERE ebeln = i_ekpo-ebeln.
        IF sy-subrc = 0.
          MOVE sum TO i_zzep_pohdr_s-pri_ele_net_val_doc_curr.
          MOVE sum TO i_zzep_pohdr_s-pri_ele_rate.
        ENDIF.
      ENDLOOP.
      MODIFY t_zzep_pohdr_t FROM i_zzep_pohdr_s INDEX current_line.
    ENDLOOP.
  ENDIF.
pls suggest me...
thanks.
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:49 PM

Similar Messages

  • Does anybody know table for copy controls from Sales document to Delivery

    Hi,
    Does anybody know table for copy controls from Sales document to Delivery. Especially for item level.
    Regards,
    Praveen

    >
    Lakshmipathi wrote:
    > Almost all members know copy control from sale order to delivery.  What exactly your problem is ??   Please post that and avoid asking questions like this !!!!!!!!!!
    >
    > thanks
    > G. Lakshmipathi
    Sorry for my post. I guess you were a wee bit quicker than me in the reposnse

  • How to create tables for control data

    HI
    How to create  tables for controls of types of data (screen control)? what is the process for this
    Regards,
    Anil

    Well, do you want to do it the easy way?  If so, then just create a table maintenance program.  You can do this via SE11, utilites, table maintenance generator. The table maintenance will be generated and you can then maintain the table via SM30. 
    If you want to go the more challenging way, you can write your own table maintenance program using a table control on your screen.  You can use the table control wizard to help you along.
    Regards,
    Rich Heilman

  • How to find tables for a particular business object.

    Dear Friends,
    I want to display, all the tables related to a particular business object.
    So I think there must be way of doing it using packages.
    example:-
    I will have list of all packages referencing to all business Components
    (ex.SALES) then i will get a list of all the tables related to SALES and then I would like to get all the METADATA regarding that TABLE.
    please give me some ideas How to achieve this.
    thanks,
    jeevan

    hai Naveen ,
    Thanks for the reply.
    I had gone through the Link.
    I want to know "How could I get the list of all the Tables of a particular Business Component"
    like suppose i entered Sales i sould get all the tables related to Sales ....if  MM then list of MM tables...
    in Se80 the package VA is for sales .....
    and there i can get all the tables for sales...
    but If u know any searching criteria by which i will be able to the list of tables.
    thx,
    jeevan

  • I need to know table for field CLASS , which is coming in cl30n

    Hi,
          I have to create a report customer meterial price.For this I need  one coloumn i.e  Finished Good material(coming from cl30n transaction and field name CLASS). I want to know in which table this field  "CLASS" is getting stored.AS I am getting 
    structure CLSELINPUT  where this field is stored but I need to know table .
    Regards.

    Hi Ian ,
                  Thanks for your support.I need to fetch spare part meterial on basis of this class .which is the correct  table to get spare parts details and how we can link klah with it.
    Regards.

  • How to get Tables for the datasource

    Hi ,
    When i have a datasource,How do i get to know..What are the table for that data source.
    Thanks,
    Kiran.

    Hi,
    In ECC:
    1. goto RSO2 and give datasource name and display, if it is SAP defined datasource it will display some warning message in Status bar, so again press Enter Button and then see teh datasource there you can fine FM, Table/VIiew, InfoSet like that, in this way you can fine, if it is build on Function Module then you need to see that FM and debug and find. For LO dataSources you can fine in LBWE.
    https://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
    Thanks
    Reddy

  • How can Select tables for master item

    Hello
    We have EBS R12
    and i have reports builder, i just want to view all master items using reports builder since many tables are in the database
    how can check or select exact tables
    thanks

    If you tried to make a purchase from Apple.com, they offer you the opportunity to add a second credit card if you have one. If you do not have one, then you need to contact the back or institution that handles your credit card for them to approve the purchase.
    Just so you know, you are not addressing Apple here, we are users like you.

  • How to find table for structure field ???

    Hi..
    i need your expert help on this.
    i am working on printing of terms of payment description. here there are explanation fields. it is coming from structure R052. and field name is TXT 02. here as per my understanding structure is coming from multiple tables so how i can find that from which table this field is coming??
    thanks
    h shah

    Dear,
    Well I cant say this is the solution for your issue, but have a look.
    http://it.toolbox.com/wiki/index.php/Find_data_in_your_SAP_system_and_know_which_tables_do_what
    DD02L - table properties
    DD02T - table texts
    DD03L - field properties
    DD03T - field texts
    How to find data related to a structure? With GREAT difficulty, but here are some ways (which will NOT work sometimes) to find specific fields if you know the structure's fieldname.
    1) First, goto SE11, and enter your structure name. Goto the field that holds your data, and double-click on the element name. Once inside the element, do a where-used list for that element, searching tables only. Then go into each table, and see if you can find the one holding your data. There may sometimes be a huge number of tables displayed, but a lot of them will be empty.
    2) Get the name of the program behind your transaction, goto SE80, and enter the program name. 99% of the time it will be part of a module-pool and bring up the pool. Goto the dictionary structures, and search each table there for the one holding your data.
    3) Open a new session with transaction ST05, select SQL Trace, click on the Trace On button, and go back to your transaction (while leaving the session with ST05 open). Submit your transaction, and go back to the ST05 session. Click on the Trace Off button, then select the List Trace button. Continue with standard selections, and a BASIC TRACE LIST will appear. search thru the tables displayed under ObjectName.
    and have a look at below.
    You do know any transaction in which (related) data is used: 1) start the transaction 2) position the cursor on the field you want to have info about 3) press F1, then F9 4) now you see the technical information of the data element, such as table name and field name. 5) if the table mentioned is what you're looking for, you're done. It is also possible that the data element is in a structure and not in a table. Now you can either analyze the structure via trx SE11, or you can double click on the 'data element' field. In the next screen, use the 'Where used' button to find the tables in which this data element is used.
    Additional tip: if you have found the table name, you can use trx SE36 to see the relationships of this table to other tables. You can use these relationships when defining queries, designing custom ABAP programs, etc. If you're lucky, one or more standard SAP logical database exist which contain the table you found in the previous steps. Proceed as follows: 1) start trx SE36 2) use the search help for the logical database name 3) enter the name of the table in the search help 4) press enter and, if you're lucky, you'll see a list of logical databases. Select one, press enter, select the radio button 'Structure' and press the view button. Now you'll see how this table is related to other tables.
    And finally, I prefer, the simpliest way to contact the ABAP consultant for help.
    Regards,
    Syed Hussain.

  • How design transaction table for  accounting system

    Hi master;
    Sir,
    I making accounting system for garment factory chart of account table I design but
    I confused in transaction table how I design make only one table
    Such as
    Trans
    Ac_code
    Date
    V_no
    Description
    DR_amount
    CR_amoun
    Chequ_no
    Or make transaction master detail style
    Tran_master
    V_no
    Date
    Description
    Ac_code
    Chequ_no
    Tran_detail
    S_no
    V_no
    Ac_code
    Description
    DR_amount
    CR_amoun
    But how I get ledger from both style please give me idea how I set transaction table
    Or give I any sample application or sample code
    Thanking You
    Aamir

    Hi master;
    Sir,
    I making accounting system for garment factory chart
    of account table I design but
    I confused in transaction table how I design make
    only one table
    Such as
    Trans
    Ac_code
    Date
    V_no
    Description
    DR_amount
    CR_amoun
    Chequ_no
    Or make transaction master detail style
    Tran_master
    V_no
    Date
    Description
    Ac_code
    Chequ_no
    Tran_detail
    S_no
    V_no
    Ac_code
    Description
    DR_amount
    CR_amoun
    ut how I get ledger from both style please give me
    idea how I set transaction table
    Or give I any sample application or sample code
    Thanking You
    Aamir
    only one table voucher may have more then one invoice then i would go with master detail .
    If you maintain one table how will you maintain more then one invoice's voucher.
    Khurram

  • How to create tables for using in SQL/php website

    Sorry for asking basic question because I 'm knew.
    i was building a dw site for listing multiple products. i was following DW, the Missing Manual book tutorials. The tutorial offers downloadable data tabels in a folder with .sql extension. I just cannot find anywhere an instruction as how the .sql folder is created.
    Second question: if it can be created in Access 2007, please tell me how.
    thank you sooo much.

    Hi Walt,
    Thank you so much for spending the time trying to answer me.
    you are right, it is a .sql file, not a folder. However, once it is imported into MySQL server, it spits out 4 tables. Please see the following tutorial steps:
    "4. in phpMyAdmin's top navigation bar, click the Import button.
    Doing so takes you to a page that lets you type in an SQL query or load a test file that has SQL commands in it. You'll do the latter-load a text file that contains all the SQL necessary to create the tables and data for the database.
    5. Click the Browse button in XAMPP (application software for SQL server), In the File Upload window that appears, navigate to and select the file cosmofarmer.sql in the php_dynamic folder you downloaded with the tutorial files.
    6. Click the Go button.
    The MySQL server slurps down the SQL file, and executes the instructions found within it. The results? Four new talbes are created (see the list of talbles that just appeared on the left side of the phpMyAdmin window) and a bunch of data is added to them. "
    The book I am reading explains everything but how the cosmofarmer.sql file was made.

  • How to create table for XML schema-based Interface form

    Hi All,
    With tcode SFP to crate  a XML schema-based Interface form, how to create a defined table can be listed in "Data View"?
    Just like APAP Dictonary- Based Interface form, that we can drag  a defined table from data view to the panel.

    Hi,
    Just follow these steps:
    1. Create interactive form UI element in your view.
    2. Now provide Datasource and PDFSOURCE to it in form properties.
    3. Now give a template name prefix with 'Z' or 'Y'.
    4. Double click on it. It will prompt for interface name.
    5. Provide interface name prefixed with 'Z' or 'Y'.
    6. Click on Context button in the Pop up window and provide the node you have selected as DATASOURCE.
    7. Click ok and it will open the form designer.
    8. In this way you can create a XML Schema based Form.
    9. Activate the interface and design the form providing layout type and other details.
    Hope it will help.
    Regards,
    Vaibhav

  • How to find Tables for Consolidation CS

    I have just uploaded data into our consolidated chart of accounts using flexible upload.Now we need to develop an abap program which would make adjustments to our reported data using recordings of cx50.I am having problems trying to locate the uploaded data in sap standard tables.Could please guide me as to which tables i should use.thanx

    Hi
    Please check these table and let me know.
    SKA1     G/L Account Master (Chart of Accounts)
    SKAT     G/L Account Master Record (Chart of Accounts: Description)
    T854       Financial statement items for consolidation
    T854T     Financial statement item texts
    T854U     FS item short texts
    TDDAT    Maintenance Areas for Tables
    If help full assign point.
    Rgd

  • Report Painter : How to check table for form

    Hello I am creating a report at FSI2 using form 0SAPROLLP-01
    I would like to modify or add a field present here.
    How can I determine which table the form belongs too?
    regards
    ken

    Go to report parameters and go the Form.  Hit F1 and click on technical information.
    Hope it helps.

  • How to design tables for Apex applications?

    Hi,
    I am learning Apex . I have one question.
    Considering normal tables, I have primary key (some single column and some composite) for my tables.
    But I learnt that Apex works well when we have primary keys using sequences.
    So Should I do the following now.
    1) Add a new column to all my tables which gets populated from Apex directly and make that column as primary key
    2) Create a sequence to associate each such primary key
    3) Make the actual primary keys as Unique keys + Not null constraints
    Thank You

    Why are you designing your tables o suit the tool? What happenes when you change development products? You SHOULD develop based upon SOUND database design methods. Use of surrogate keys IS a prefered development method, since use of multi-key (Composite) keys is known to be a pain for multiple reasons..
    Take this small bit of knowledge.. Design you database properly for an interface and you will NOT have issues..
    Thank you,
    Tony Miller
    Raleigh, NC

  • How to fetch tables for a particular pricing document?

    Hi all,
    From which tables I have to fetch for particular pricing document that has a particular Condition type?For exampe i am asked for to fetch Pricing document 'IDV' that has a 'ZQTG' Pricing Condition Type.By the way is there any difference between pricing document and pricing condition.
    Thanks,
    Balaji.

    Hi Balaji
    The entries will be in a combination of tables. In
    simple you can get it from KONH and KONP. But to determine them is a hardsome task.
      Let me try to write it down for you understanding.
    To extract the prices:
      Firstly it depends on the condition type eg: ZCND.
      Next the access sequences: eg: 501, 502. Access
    sequences defines the combination of fields. This
    combination of data you can see in KONH-VAKEY.
      So the reference tables will be A501 & A502.
      From these tables you can get the condition record
    number(KNUMH). Using KNUMH you can go to KONH and KONP
    to extract prices.
      Above is for extraction. Hope the info is helpful for
    you.
    Kind Regards
    Eswar

Maybe you are looking for

  • Question Mark / not reading hard drives

    I have a flashing question mark /apple icon on the attempts to startup my G4 . Not reading the drives . I have used the startup disk & checed the profile & it reads the drives in the extensions, however not on startup

  • SelectOneChoice value

    I have a ad selectOneChoice related with a ViewObject: <af:selectOneChoice value="#{bindings.DocumentoVista.inputValue}" label="Tipo Documento:" required="#{bindings.DocumentoVista.hints.mandatory}" shortDesc="#{bindings.DocumentoVista.hints.tooltip}

  • Sql Count Help

    Hi Everyone, I need to display SPER_STATUS_TEXT count as 0 if there is no data for below Query. Could someone please help me SQL> SELECT a.sper_status_text, COUNT ( * ) 2 FROM (SELECT sper.assettxt, 3 CASE 4 WHEN sper.sper_status_text = 'Affirmed Eva

  • LMS 4: Donde puedo encontrar un paso a paso (step by step)

    CiscoWorks LMS4 Soy nuevo con esta herramienta, y la verdad es que tiene muchas cosas y no se por cual empezar. Si hay algún manual o si me pueden guiar por aquí se los agradezco. Gracias. Sent from Cisco Technical Support iPhone App

  • UI Loader in Flash will not locate my images at server

    hello...i work flash cs5 in as3....i have a problem with the uiloader..at swf file everything are ok...when i upload to a server my images are not exist... can you help me with that?????