Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

komk and komp

Former Member
0 Likes
2,511

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

8 REPLIES 8
Read only

Former Member
0 Likes
1,500

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

Read only

Former Member
0 Likes
1,500

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

Read only

0 Likes
1,500

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

Read only

Former Member
0 Likes
1,500

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

Read only

0 Likes
1,500

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.

Read only

Former Member
0 Likes
1,500

hi,

The updated condition type values held in XKOMK and XKOMP..

These are the internal table defined by SAP in standard progms.

Kishore.

Read only

Former Member
0 Likes
1,500

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

Read only

Former Member
0 Likes
1,500

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