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: 

ME51N Bdc upload

0 Kudos

Hi to all,

I have requirement to develop bdc program for me51n(purchase requisition.). Here i have to upload Header text and item texts,etc. Please anyone share sample code for this.

Thank you.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi, you should use bapi fm BAPI_PR_CREATE

you can pass texts for header and items by filling parameter tables

PRITEMTEXT LIKE BAPIMEREQITEMTEXT

PRHEADERTEXT LIKE BAPIMEREQHEADTEXT

12 REPLIES 12

nabheetscn
Active Contributor
0 Kudos

Hi Krishna

First of all if PR's are already created then you can simply use SAVE_TEXT etc to update the texts BDC wont work. In case you are creating a PR do it via BAPI (search you will find many). Using BDC you can not update the texts

Nabheet

0 Kudos

Hi Madan,

Thank you and can you give any code to upload with texts using bapi.

0 Kudos

If the PR are already created you just have to identify the ids for each text and call FM SAVE_TEXT just do a where used on this FM for code or search on sCN for example please

Nabheet

Former Member
0 Kudos

Hi, you should use bapi fm BAPI_PR_CREATE

you can pass texts for header and items by filling parameter tables

PRITEMTEXT LIKE BAPIMEREQITEMTEXT

PRHEADERTEXT LIKE BAPIMEREQHEADTEXT

0 Kudos

Can you give an example?

0 Kudos

Can you give an example?

0 Kudos

flat file is without pr no so sap has to create pr no. Please suggest me how to write code using bapi.

0 Kudos

Krishna please read the documentation of the BAPI/search on scn/do a where used list for this FM for the code.

Nabheet

raymond_giuseppi
Active Contributor
0 Kudos

First read  381630 - Batch input for Enjoy transaction in MM not possible , then  481034 - FAQ: Data transfer (batch input) in purchasing and read documentation of BAPI_PR_CREATE. Then post only the problem you got and what you did before.

Regards,

Raymond

narendar_naidu
Active Participant
0 Kudos

hi krishna,

1. firstly u cannot create BDC for enjoy transactions, instead of ME 51 n try ME51.

2. Im not clear on how can u update texts without PR no.

regards,

0 Kudos

Hi Naren,

using bapi_pr_create we can update texts and bapiret2 return new pr no.

For texts we have  BAPIMEREQHEADTEXT,bapimereqitemtext parameters. and follow above suggestions.

Thank you for all and i completed my development.

0 Kudos

Hi krishna,

You said that you have completed your development using bapi_pr_create. I am also creating a program, but I am not able to input header data using bapi_pr_create. Can you give me sample code.

Regards,

Hitesh.