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

Error while creating a PR

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
970

Hello All,

There is a strange error encountered while creating a PR using BAPI_PR_CREATE

The error is Enter a G/L Account. Even when I am providing with the G/L Account number.

There is one input field as SERIAL_NO in tables PRACCOUNT and PRACCOUNTX. If I leave it as 00 then it gives an error and no PR is created.

If I give SERIAL_NO as 01 in tables PRACCOUNT and PRACCOUNTX, then also it gives the same error but now PR is created simultaneouly.

Using the same details if I execute BAPI_REQUISITION_CREATE and SERIAL_NO as 00, the PR is successfully created.

Please suggest where am I going wrong....?

Thanks & Regards,

Tarun Gambhir

10 REPLIES 10
Read only

Former Member
0 Likes
910

can you please pass the 10 digit G/L acc..if not then u have to do pass thru foll FM

For Padding zeros

CONVERSION_EXIT_ALPHA_INPUT

also check in PRACCOUNTX-GL_ACCOUNT = 'X' else u ll get error

cheers

Edited by: Madan Gopal Sharma on Jul 29, 2009 9:03 PM

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
910

I dont think using the conversion routine will help.

And I am already passing PRACCOUNTX-GL_ACCOUNT = 'X'.

Still looking for useful pointers

Thanks & Regards,

Tarun Gambhir

Read only

0 Likes
910

Do you filling both


it_praccount-serial_no = '01'.

lt_praccountx-serial_no = '01'.
lt_praccountx-serial_nox = abap_true.  " <<<<--

a®

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
910

Thanks for your reply.

But even passing those details, I get the same error.

Regards,

Tarun

Read only

0 Likes
910

Hi,

Try filling these tables with these values:

praccount-preq_item = '10'.

praccount-serial_no = '1'.

praccountx-preq_item = '10'.

praccountx-serial_no = '1'.

regards,

Leonard Chomi

Edited by: leonard chomi on Jul 30, 2009 9:31 AM

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
910

Hi,

I am already passing these details.

But still the same error is returned "Enter a G/L Account" and a PR number is also created at the same time.

So I am really confused though PR is created and error message returned as well.

Still looking for some useful pointers..

Thanks & Regards,

Tarun Gambhir

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
910

Hi,

Any pointers why the error "Enter a G/L account" is coming even though the Purchase Requisition number is created...

Please suggest..

Thanks & Regards,

Tarun

Read only

0 Likes
910

Hi,

did you pass controlling area.

move item_no to it_account-preq_item.
    move item_no to it_accountx-preq_item.
    move 'X' to it_accountx-preq_itemx.


    srno =  1.
    move srno    to it_account-serial_no.
    move srno to it_accountx-serial_no.


    move vit_ss_recs-menge_ss
                 to it_account-quantity.
    move 'X' to it_accountx-quantity.

    move det_acct-wbs_element
                 to it_account-wbs_element.

    move 'X' to it_accountx-wbs_element.

    move det_acct-gl_account to it_account-gl_account.
    move 'X' to it_accountx-gl_account.

    move '0003' to it_account-co_area.
    move 'X' to it_accountx-co_area.

    append it_account.
    append it_accountx.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
910

Thanks for your reply..

I passed the same details, but again I get the error "Enter G/L Account" and PR is also created.

Actually I am reading the return table with message type E in which I get the above mentioned error.

I am not able to eliminate this error even though PR is created.

Still waiting for any useful pointerss...!!!

Regards,

Tarun Gambhir

Edited by: Tarun Gambhir on Aug 17, 2009 10:35 AM

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
910

Seems that no new advice on this.

So closing this thread.