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: 

Dynamic BDC - VK12

Former Member
0 Kudos
315

Hello All,

I have an urgent requirement......

I developed a BDC program to change a particular condition type(Tcode VK12, Ex: condition type :ZXXX).

Now I need to enhance the program to work for multiple condition types. From the 3rd screen onwords the screen name and screen numbers are changed from condition type to condition type and key combination to key combination.

Could you please suggest me for further development.

Thanks in advance,

Jana

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos
107

hi,

try to use standard-report <b>RV14BTCI</b>

-> look documentation to that abap

A.

4 REPLIES 4

andreas_mann3
Active Contributor
0 Kudos
108

hi,

try to use standard-report <b>RV14BTCI</b>

-> look documentation to that abap

A.

0 Kudos
107

Hi Andreas,

This program will actually read the file from application server. My flat file will be on local machine and It should work for all condition types.

If anybody worked on this kind of requirement, please suggest me...

If anybody send piece of code will be highly appreciated.....

Thanks in advance,

Jana

0 Kudos
107

hi,

a piece of code:

DATA NODAT VALUE '/'.
loop at hkond.
*** 1. Bgr00 fill
  CLEAR BGR00.
  BGR00-STYPE = 0.
  CONCATENATE 'KOND_MM_' SY-DATUM+4(4) INTO BGR00-GROUP .
  BGR00-MANDT = SY-MANDT.
  BGR00-USNAM = SY-UNAME.
  BGR00-XKEEP = 'X'.
  BGR00-NODATA = NODAT.
  TRANSFER BGR00 TO FILE2.
***2. new cond.-> new head
    AT NEW KSCHL.
      CLEAR BKOND1.
      BKOND1-STYPE = 1.
      BKOND1-TCODE = 'XK15'.
      BKOND1-KVEWE = 'A'.
      BKOND1-KOTABNR = '044'.
      BKOND1-KAPPL = 'M'.
      BKOND1-KSCHL = HKOND-KSCHL.
      TRANSFER BKOND1 TO FILE2.
    ENDAT.

***3. main data !!
    CLEAR BKOND2.
    BKOND2-STYPE = '2'.
*EKORG / LIFNR
    CONCATENATE 'ZORG' HKOND-LIFNR INTO BKOND2-VAKEY. "key
move: hkond-datbi to bkond2-datbi,
      hkond-datab to bkond2-datab.
    BKOND2-KBETR = HKOND-KBETR.
*** Rest fill with nodata
    BKOND2-KONWA = NODAT.
    BKOND2-KPEIN = NODAT.
    BKOND2-KMEIN = NODAT.
    BKOND2-MWSK1 = NODAT.
    BKOND2-KONMS = NODAT.
    BKOND2-MXWRT = NODAT.
    BKOND2-GKWRT = NODAT.
    BKOND2-STFKZ = NODAT.
    BKOND2-KZNEP = NODAT.
    BKOND2-LOEVM_KO = NODAT.
    BKOND2-SKONWA = NODAT.
    TRANSFER BKOND2 TO FILE2.
endloop.

A.

Former Member
0 Kudos
107

Hi Janardhan,

In that case we have to do separate separate mappings for each condition since the fields will be changed based on the condition.

Now collect the complete data from file to Internal table irrespective of the Type.

Loop the internal table and chekc the condition type and populate the separate internal tables(say IT_CON1,IT_CON2 etc).

Now you have all condition records in different tables. But each table have the same condition records.

Now loop the repective condition type table separately and perform mapping and the BDC method.

Hope it will do.

Regards

Eswar