Skip to Content
author's profile photo Former Member
Former Member

Extension in BAPI_ACC_DOCUMENT_POST

Hi All,

I want to extend BAPI_ACC_DOCUMENT_POST to post profit center for my AP account. But somehow in BADI ACC_DOCUMENT, the profit center's value 'ZBSMBL' is not read into the valuepart1 field.

Here's the code for my extension table:

clear: ls_zzz, i_gt_extension2.

ls_zzz-prctr = 'ZBSMBL'.

append ls_zzz.

MOVE ls_zzz TO i_gt_extension2-valuepart1.

MOVE 'ACCIT' to i_gt_extension2-structure.

APPEND i_gt_extension2.

code for BADI:

DATA:

ls_zzz TYPE accit,

wa_extension type bapiparex,

wa_accit TYPE accit.

LOOP AT c_extension2 INTO wa_extension.

ls_zzz = wa_extension-valuepart1.

READ TABLE c_accit WITH KEY prctr = ls_zzz-prctr

INTO wa_accit.

IF sy-subrc IS INITIAL.

wa_accit-prctr = ls_zzz-prctr.

MODIFY c_accit FROM wa_accit INDEX sy-tabix.

ENDIF.

ENDLOOP.

in here ls_zzz-prctr always return empty , pls advice

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 10:27 AM

    Have you looked at the option of substitution and validation for populating the field?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.