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 Problem

Former Member
0 Likes
974

Hi ,

I am trying to update the PIR records using BDC. The transaction used is ME12. Now if i enter the vendor,material and pur org for certain materials it gives me a status message 'No purchasing organisation data exists'. Now these records are not supposed to be processed in my program. How do i capture this status message in my program before calling the BDC .

Please reply.

Thanks,

Sindhu.

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
922

You can check that against table EINE, if the PIR does not have a valid record for the purchasing org, then you can handle this before the BDC.

REgards,

Rich Heilman

Read only

Former Member
0 Likes
922

Do as RIch said. Yo can check it on T001W table too.

BR, JAcek

Message was edited by: Jacek Slowikowski

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
922

Hi,

Before passing the data to the BDC u can validate that data against the standard table.

If it satisfies ur requirement keep that in the internal table if no then delete that entry from the internal table.

Then finally u will have the entries that u want to process..

Hope this is needful..

Cheers,

Simha.

Read only

Former Member
0 Likes
922

Hi Sindhu,

I think you should carry out a SELECT on tables EINA and EINE (joined by INFNR), restricting by LIFNR, MATNR and EKORG. If that SELECT yields no results, then you should skip these record.

SELECT SINGLE eina~infnr
  INTO eina-infnr
  FROM eina INNER JOIN eine ON eina~infnr = eine~infnr
  WHERE eina~lifnr = ...
    AND eina~matnr = ...
    AND eine~ekorg = ...
IF sy-subrc <> 0.
*  skip record
ENDIF.

I hope it helps. BR,

Alvaro

Read only

Former Member
0 Likes
922

HI

GOOD

ME12 IS FOR CHANGE INFOR RECORD,

IF IT IS GIVING YOU AN ERROR MESSAGE AFTER ENTERING THE VENDOR , MATERIAL AND PRUCHASE ORGANIZATION THAN THERE MUST BE SOME CONFIGURATION PROBLEM ,

GO TO SK02 TCODE AND MAINTAIN THE VENDOR MASTER PURCHASING ORGANIZATION DATA

GO TO MM02 TCODE AND THERE ALSO MAINTAIN THE MATERIAL DATA.

THANKS

MRUTYUN

Read only

0 Likes
922

There is no config problem, you can create a PIR without having purchasing org level data. This data is stored in EINE, but does not have to be created in order to have a PIR. For example, if you go to ME12 and maintain a PIR and don't put in the purch org, you will see only the data from the EINA table.

REgards,

Rich Heilman

Read only

Former Member
0 Likes
922

Dear Sindhu,

You can execute the Program in BDC Foreground Method and find out where exactly the error appears. PLease let us know if the issue is solved.

Regards,

Shankar