Skip to Content
author's profile photo Former Member
Former Member

Need BDC program for ME21n

Hi All-

I was using BAPI(BAPI_PO_CREATE1) to create PO's for me21n...But if I have 10 records in my file, it is skiping few records from the internal table and it is creating for the rest of the records...If I take seperate file for the skipping records, it is creating again using the same BAPI...

Do we need to apply any OSS note for this problem....

So, instead of using BAPI, decided to use BDC for ME21n using Call transaction...If you have BDC program,can you please forward to me...

I will assgin points if anyone can help me out!!!!

Thanks,

Sony...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 02:45 PM

    Hi,

    You can't use BDC to work through ME21n as it is an enjoy transaction and hence the custom controls it uses won't work with BDC.

    You'd be better figuring out why the BAPI is failing - have you debugged through to see why certain items are missing? Or does it pass back any messages in the return table.

    Gareth.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      My requirement is also almost same.

      Instead of Shedule lines , i have to update the Confirmations for the item ?

      How can i do this ? Because i think we dont have a parameter in the BAPI to pass these confirmations ?

      Please help out.

  • Posted on Feb 26, 2007 at 02:46 PM

    Hi Sony,

    ME21n is an senjoy transaction and you cannot do a BDC for such transactions.

    Try to a BDC for ME21 instead.

    If you know how to create a PO manually using the transaction, you have to do the same thing in a recording mode.

    Go to SHDB transaction.

    Record the transaction ME21 and generate a program out of the recording.

    Modify the program according to your requirement if requuired.

    But i think there must be a proble in the way you have coded for teh BAPI, for all i i know the BAPI is capable of doing everything that a transaction can do.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 02:51 PM

    HI,

    bdc on njoy transactions is not possible as far as my knowledge goes.

    more over in ur case

    u r saying tht some of the records are skipped.

    this is bcoz loop-endloop routine runs at lightening speed where the commit work in the bapi takes time to update the database so, after commit work in the bapi or after that bapi plz includde a wait stmt so as to delay the loop (say 5 sec) there by allowing the database ti finish the updation and comeback and pick the next record.

    hope this works

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Kare...But I was using wait = 'X' in the Commit Function module and also I am using DEQUEE_ALL function module also....But still it is not working...

      Do you mean I need to use wait also after commit the Transaction?

      Thanks,

      Sony

  • Posted on Feb 26, 2007 at 03:14 PM

    Hi,

    Try to use the following fm BAPI call

          call function 'ENQUE_SLEEP'
            exporting
              seconds = ntime.
    

    May be this will help you.

    aRs

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.