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

BDC

Former Member
0 Likes
507

Hi all,

I have a requirement in HR. This is BDC. There are 2 process.

1. In input file indicator is 'C' means change record in infotype 2001 and if subtype 1200 means change in infotype 0082 otherwise no need.

2. In input file indicator is 'N' means create record in infotype 2001 and if subtype 1200 means create in infotype 0082 otherwise no need.

Before create/change record in 0082, check whether record exists in infotype 2001 or not.

for Exam: indicator is 'N', then we need to create a new record in 2001. So I'll write BDC coding(session - Perform statements). if subtype is '1200'. So i need to create a record in infotype 0082.

In this place i must check whther record exists or not in 2001.

But the new record will update after process the session in 'SM35'. How I check before inserting a record to 0082?

if may use 2 programs to implement the logic. but req is will develope in single program.

Thanks.

3 REPLIES 3
Read only

saranwin
Contributor
0 Likes
480

HI,

First record BDC as per your requirtment( Change and Create). You record separately for change and create and put the condition below.

Read Table lt_itab into wa_itab or loop at lt_itab into wa_itab.

if input file indicator is 'C'.

if infotype eq '2001' and subtype eq '1200'.

infotype eq '0082'.

change....

endif.

elseif input file indicator is 'N'.

if infotype eq '2001' and subtype eq '1200'.

infotype eq '0082'.

create....

endif.

endif.

You don't want to create two Program for this. You can do in one program

Revert back for your further needful.

Regards,

saran

Read only

Former Member
0 Likes
480

Hi Saran,

Thanks for reply. I already developed the program as your logic. i mean developed all logic in single program.

My question is

for Exam: indicator is 'N', then we need to create a new record in 2001. So I'll write BDC coding(session - Perform statements). if subtype is '1200'. So i need to create a record in infotype 0082. So I'll write BDC coding

In this place i must check whether record exists or not in 2001 before inserting record to IT0082.

But the new record will update in 2001 IT 2001 after process the session in 'SM35'. How I check before inserting a record to 0082 in program ?

Thanks.

Read only

Former Member
0 Likes
480

Thanks to all.