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

Custom program to load grant budget into sap using BAPI_0036_CREATE

Former Member
0 Likes
724

We have a custom program that uses BAPI_0036_CREATE.  The GMBDGTHEADER table has a field called process with the following values:

ENTR(enter), PRTN(psthru trsfr rtn), PTRN(psthru transfer), RBBP(rev. incr), RETN(return), SUPL(supplement) and TRAN(transfer).  Right now the custom program is hard coded and only using ENTR. 

There is a new requirement to put this field on the selection screen so they can use the other values.  We found that all of the values posted successfully except for TRAN(transfer). 

We get the following error when tryinng to post the document: 'Document must be balanced (Payment Budget 2013).  When we create the document manually, it posts successfully because table GMBDGTHEADER-SIGN is blank for each entry.  When we use BAPI_0036_CREATE, it puts a '+' sign for positive amount in field GMBDGTHEADER-SIGN and a '-' sign for negative amount in field GMBDGTHEADER-SIGN.  This is definitely the problem, because I changed the SIGN field to space in debug mode and it posted.

Has anyone else run into this problem?

Thank you.

We have a custom program that uses BAPI_0036_CREATE.  The GMBDGTHEADER table has a field called process with the following values:

ENTR(enter), PRTN(psthru trsfr rtn), PTRN(psthru transfer), RBBP(rev. incr), RETN(return), SUPL(supplement) and TRAN(transfer).  Right now the custom program is hard coded and only using ENTR. 

There is a new requirement to put this field on the selection screen so they can use the other values.  We found that all of the values posted successfully except for TRAN(transfer). 

We get the following error when tryinng to post the document: 'Document must be balanced (Payment Budget 2013).  When we create the document manually, it posts successfully because table GMBDGTHEADER-SIGN is blank for each entry.  When we use BAPI_0036_CREATE, it puts a '+' sign for positive amount in field GMBDGTHEADER-SIGN and a '-' sign for negative amount in field GMBDGTHEADER-SIGN.  This is definitely the problem, because I changed the SIGN field to space in debug mode and it posted.

Has anyone else run into this problem?

Thank you.

3 REPLIES 3
Read only

gouravkumar64
Active Contributor
0 Likes
640

Hi,

almost similar kind of probelm solved here,have a look at thomas's reply.

http://scn.sap.com/thread/3258536

Thanks

Gourav.

Read only

0 Likes
640

It wouldn't think it would post manually if this was the issue.  It does post manually.

Thank you.

Read only

0 Likes
640

Can anyone help with this?  Should I be using another BAPI?

Thanks.