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: 

Condition upload

Former Member
0 Kudos

hi, i am trying to upload the condtion for pricing,

the thing is that ,for particular condition i have customised key combination, the fiels which are req for key combination are in komg,but before loding the record,i have to pass fields of key combination also,but these fiels are not in standard structure for condtion upload,bkond1,bkond2,i need to appendthe komg structure,but the will the standard program RV14BTCI which upload the records can upload the komg fiedls also, i am notgetting can u please help me.

thanks ,

deepak sodhi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

I have condition record numbers and in it it has tables created. Each table has selection fields defined it. so when i try to retrive the value of this variable key,

it gets it from the table KONH. the field i get is VAKEY. This key is all clubbed, where they have to be seperated by a space according to the key combination. I tried to get any function module or tables which provides this varable key in

the required format but i failed. Can any one please help me in handling this VAKEY. I just need to breakk this VAKEY based on the key that is defined on its Condition table(KOTABNR) number.

Thanks in advance,

7 REPLIES 7

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Deepak!

I'm not sure, how much of necessary steps you already did. But it's easy to check: create a condition with VK11 (sales) or MEK1 (purchasing). If this works, RV14BTCI should work, too.

In LSMW you will fill a VARKEY field, the structure definition comes from the condition table Axxx -> fields should be known with table creation.

Regards,

Christian

Former Member
0 Kudos

Hi deepak,

you can do it for KOMG fields as well.It will work for you.

Thank you.

Regards,

Karun M

Former Member
0 Kudos

The thing is that I have gone through the standard upload program RV14BTCI but I had not find any where upload of fields of KOMG. I want to know that ,if I append KOMG struct alongwith standard structure, but how the fields of komg will uploaded. Please tell mein deep.

0 Kudos

Hi!

It's mainly in

FORM vakey1_fuellen USING kvewe   LIKE bkond1-kvewe
                          kotabnr LIKE bkond1-kotabnr
                          vakey   LIKE bkond2-vakey
                    CHANGING vakey1 LIKE bkond2-vakey.
  DATA: len LIKE sy-fdpos,
        len1 LIKE sy-fdpos,
        kvewe_temp   LIKE t681-kvewe,
        kotabnr_temp LIKE t681-kotabnr.
  CHECK: ds_check EQ space.

  CLEAR: vakey1, len.

  kvewe_temp   = kvewe.
  kotabnr_temp = kotabnr.

  PERFORM set_access_program(sapmv130)
               USING kvewe_temp kotabnr_temp progr.
  CLEAR komg.

* ----- Die Felder aus dem variablen Schlüssel werden in den ---------
* -----         Kommunikationsblock transportiert -------------------
  PERFORM fill_komg_from_vakey IN PROGRAM (progr)
                                 USING komg vakey.

  LOOP AT x_t681e WHERE fsetyp NE 'B'.
* -------  Vakey-Wert in entsprechendes Komg-Feld
    ASSIGN x_t681e-sefeld TO <a>.
    MOVE <a>  TO feld-sefeld.
    ASSIGN (feld) TO <a>.

    vakey1+len = <a>.
    DESCRIBE FIELD <a> LENGTH len1 IN CHARACTER MODE.
    len = len + len1.
  ENDLOOP.

ENDFORM.                               " VAKEY1_FUELLEN

Roughly: there is a structure like your A-Table (only the relevant key fields). The VAKEY of input is moved into this structure. This makes implicit the split into the correct fields (e.g. sales org, distr. channel, article...). Now a move-corresponding to KOMG is possible (or done step by step with field-symbol).

Regards,

Christian

Former Member
0 Kudos

Hello,

I have condition record numbers and in it it has tables created. Each table has selection fields defined it. so when i try to retrive the value of this variable key,

it gets it from the table KONH. the field i get is VAKEY. This key is all clubbed, where they have to be seperated by a space according to the key combination. I tried to get any function module or tables which provides this varable key in

the required format but i failed. Can any one please help me in handling this VAKEY. I just need to breakk this VAKEY based on the key that is defined on its Condition table(KOTABNR) number.

Thanks in advance,

0 Kudos

Hi Deepak!

It's easy to do yourself, let's take A073 as example. Vakey contains fields between KSCHL and DATBI (excluding these two).


data: begin of key_struc,
        vkorg like a073-vkorg,
        vtweg like a073-vtweg,
        matnr like a073-matnr,
        vrkme like a073-vrkme,
      end of key_struc,
      vakey like konh-vakey.
move vakey to key_struc.  "Split vakey into fields
*...
key_struc-vkorg = '1000'.
key_struc-vtweg = '10'.
key_struc-matnr = '000000000000000191'.
key_struc-vrkme = 'ST'.
move key_struc to vakey.  "Fill the vakey

There are also function modules to do this work, but they are much more complex to use.

Regards,

Christian

Former Member
0 Kudos

hi,

whhile pricing upload when i am trying to assign my source sacle structure to target scale structure BKOND3,it says that BKOND3 can only be assigned ond source structure that is directly related to source structure and while data conversion it block me,say realatioship is invalid.

can plese any body help me