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

Problem with Function module

Former Member
0 Likes
689

Hi,

I need to do the changes in the existing custom BAPI function module. As per the code first it creates delivery (Using custom BAPI) and then add the serial numbers in that delivery (Using some other custom BAPI) and finally it creates Post Goods Issue (Using custom BAPI).

My requirement : If post goods issue fails then i need to get the serial numbers into one internal table 'A' fro that delivery number using some custom FM and here i checked in the debug mode it created delivery and added serial number successfully. And also i can see those details through VL03N. But when i read with custom FM after create delivery, serial numbers are not returning into 'A'. Same code for custom FM to get serial numbers in my own test program then it returns successfully once create delivery and added serial numbers.

Could you please tell me what code custom BAPI exactly needs to get serial numbers into my internal table 'A' after create delivery and added serial numbers.

Thanks

Raju

4 REPLIES 4
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
649

Hi Rajar

In your custom FM create a tables parameter for serial number which will get filled after serail numbers are assigned. So even if PGI fails it will return you serial numbers

Nabheet

Read only

0 Likes
649

Hi Nabheet,

But after Custom FM say as 'A' calls to get serial numbers based on delivery, they need to delete the serial numbers using some other custom FM say as 'B' but FM 'A' used in this custom function 'B'. so FM -->  B fails always

I want after create delivery and added serial numbers, custom module "A" should return serial numbers. Do we need to add any statement to commit someting for back end.

Read only

0 Likes
649

Hi Raja

As i understood one custom FM contains these three FM calls. Check where are you commiting the data. Secondly add a return parameter under tables and fill with serial number after assignment

Nabheet

Read only

vishal_sharda2
Participant
0 Likes
649

Hi,

Please share the code snippet. Also, ensure you are using 'A' as table parameter in your custom FM to capture the serial number.

Thanks!

-Vishal.