‎2007 Mar 05 2:28 PM
hi friends,
can any one help me how to populate values to the structures KOMK and KOMP .
also i want to know to use these things in FM RV_PRICE_PRINT_ITEM
points are assured!!,
Regards,
Ganesh
Message was edited by:
ganesh ram
‎2007 Mar 05 2:31 PM
hi Ganesh,
Structures cannot store data ...
<b>Structures.</b> The object structure refers to the definition of a compound object that does not have any content. It's like a table or a view, but it never has entries: it's only a structure. These types of objects are used in programs for defining data structures or for defining data in the interfaces from the module pools and the screens. The basic difference between structures and tables (or views) is that the
structure does not exist at the underlying database system level; however, both tables and views do exist in the database. Structures only exist as definitions in the dictionary. As a result, structures do not need to be activated.
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
‎2007 Mar 05 2:36 PM
Hi
structure can only hold one row of data.
so loop the internal table for each row and use this FM insilde the LOOP.
regards,
madhu
‎2007 Mar 05 3:14 PM
thanks for the response,
but how i dont know how to fetch values from these strcture or i dont know how to pass values to the FM RV_PRICE_PRINT_ITEM.
thanks
ganesh
‎2007 Mar 05 3:23 PM
HI Ganesh,
take a look at this sample program
http://membres.lycos.fr/benjaminroger/pg_sap/PROJETS/computer_system/ZDELIV
Reward if it helps,
Regards,
Santosh
‎2007 Mar 05 9:00 PM
Hi ganesh,
Pass the values to the structures either by selecting the data from different tables in SAP or from any text file(Depends on how the requirement is) and call the function module.
check this for example..
form get_item_prices.
clear: komp,tkomv.
if komk-knumv ne vbdkr-knumv.
clear komk.
komk-mandt = sy-mandt.
komk-kalsm = vbdkr-kalsm.
komk-kappl = pr_kappl.
komk-waerk = vbdkr-waerk.
komk-knumv = vbdkr-knumv.
komk-vbtyp = vbdkr-vbtyp.
endif.
komp-kposn = vbdpr-posnr.
call function 'RV_PRICE_PRINT_ITEM'
exporting
comm_head_i = komk
comm_item_i = komp
language = nast-spras
importing
comm_head_e = komk
comm_item_e = komp
tables
tkomv = tkomv
tkomvd = tkomvd.
endform.
Reward if it helps.
‎2007 Mar 06 5:57 AM
hi,
The updated condition type values held in XKOMK and XKOMP..
These are the internal table defined by SAP in standard progms.
Kishore.
‎2007 Mar 06 7:24 AM
Hi ganesh,
declare tables with reference to structures KOMK and KOMP .
for ex: t_komp type table of komp.
you can now use the tables for populating data.
regards,
keerthi
‎2007 Mar 07 2:14 AM
Functionally KOMK and KOMP (actually XKOMK and XKOMP inside program) work a transfer structures between the pricing application (sales order for example) and the condition record master data.
When you create a sale order all the header values are passed to KOMK and all the item values are passed to KOMP. Then these structures are compared against pricing condition tables and KONP db table and condition records are extracted into KOMV (xkom, tkomv etc).