cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect value for BE_DOC_TYPE in BBP_PD

former_member184111
Active Contributor
0 Kudos

Hi Experts,

We are on SRM 4.0 Classic scenario. We have implemented BADI BBP_CREATE_REQ_BACK to modify the DOC_TYPE field of REQ_ITEMS.

Till the end point of execution of this BADI the value of field REQ_ITEMS[1]-DOC_TYPE is correct.But when in debugging we check the value that is passed to BAPI_REQUISITION_CREATE is some thing different.

Event after this the PR is created with correct document type.

In the R/3 System when we check in EBAN the value of field BASRT and in SRM the value of field BE_DOC_TYPE in BBP_PD is different for same SC and PR.

Shouldn't it be the same?

Where does the default value comes from before calling the BAPI from standard code?

Thanks,

Anubhav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Break at FM B470_REQUISITION_CREATE and trace the call stack backwards. Hope this helps.

former_member184111
Active Contributor
0 Kudos

Hi Jay,

I set an infinite loop in BADI BBP_CREATE_REQ_BACK and in debugging create a break point at FM B470_REQUISITION_CREATE but this FM is not called at all after pressing the Order button .

Can you help me on that?

Thanks a lot,

Anubhav

Former Member
0 Kudos

Hi Anubav,

Check your doc type attribute in org structure. If the doc type attribute is defaulted in the org structure.

Cheers

Iftekhar Alam

Former Member
0 Kudos

Sorry, I was too presumptuous about your backend R/3 system to suggest that FM. Set a break point in

META_REQUISITION_CREATE and see if you stop there. Then start tracing from there.

former_member184111
Active Contributor
0 Kudos

Hi Iftekhar,

There were three document types defined in ORG structure NB, UB and ZNB and none wasdefaulted.

I deleted two of them i.e. ZNB and UB and only one is there now i.e. NB.

Still in starting of BBP_CRTEATE_REQ_BACK BADI REQ_ITEMS contains ZNB as doc type and event after modifying it in the BADI the doc type passed to BAPI_REQUISITION_CREATE is ZNB.

Dont think it is picking up doc type from user or org staructure attributes.

Let me know of you have any more info on this.

Thanks,

Anubhav

Former Member
0 Kudos

Hi Anubav,

Check that you have noy used DOC_CHANGE_BADI or any other modification to manipulate the doc type.

It would be good to go backward from the abap stack information and the check the doc type flow and where exactly it is populated or modified.

cheers

Iftekhar Alam

former_member184111
Active Contributor
0 Kudos

Hi Iftekhar,

Yes we are manupulating doc type in change BADI but that too is to change it to NB from ZNB but stil in REQ BADI we get it as ZNB -:(

Can help me on how to read the ABAP call stack to track where is it taking the value of doc type from?

Thanks a lot,

Anubhav

former_member184111
Active Contributor
0 Kudos

Hi Jay,

Not going to FM META_REQUISITION_CREATE either..

Thanks,

Anubhav

Answers (0)