Application Development 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: 

urgent:regarding vakey

Former Member
0 Kudos

hi,

i have a requirement for that i have to split the vakey form konh.but the structure of that vakey is different for different tables.if i split that it should work for all the tables how can i do that?

3 REPLIES 3

Former Member
0 Kudos

Hi,

concatenate KONH-KVEWE and KONH-KOTABNR. With this key you read table DD03L, order by POSITION. Gives you fieldnames, keys, position, and length of tablefields. The first two keyfields (except client) are always KONH-KAPPL and KONH-KSCHL. The rest of the key is found in KONH-VAKEY. For actual structure see result of your DD03L search.

Jo

SAPAI
Participant
0 Kudos

*Obtain the condition table name

CONCATENATE c_kote fp_curr_kotabnr INTO l_tabname.

  • Select key fields for the current condition table

SELECT fieldname leng position

FROM dd03l

INTO CORRESPONDING FIELDS OF TABLE fp_key_fields

WHERE tabname = l_tabname

AND keyflag = c_x

...................

...................

LOOP AT fp_i_key_fields INTO l_rec_key_fields.

l_length = l_rec_key_fields-leng.

l_fieldvalue = fp_rec_konh-vakey+l_offset(l_length).

l_offset = l_offset + l_length.

............

............

ENDLOOP.

Hope it helps you.

SAPAI
Participant
0 Kudos

Please reward points for useful answer and close the thread if answered.