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

BAPI_ACC_DOCUMENT_POST extension (F-48)

former_member206396
Active Participant
0 Likes
3,109

Dear SDNs,

sub : Related to Travel expense claim

While posting accounting document, i am giving SPL GL Indicator as 'T',

if indicator is not initial,

Assignment number for spl. GL account is mandatory.

Thru the BAPI, BAPI_ACC_DOCUMENT_POST, i can able to pass spl GL indicator, But there is no field related to its assignment number in vendor bapi structure. So unable to pass the assign number value to BAPI. the standard filed is BSEG-HZUON ( Assignment Number for Special G/L Accounts)

can i extend bapi to pass this value thru extension2 structure?

Can any one pls tel me procedure for extending the BAPI. how to make use of extension2? Provide me sample code or procedure...

Thanks

Ram

5 REPLIES 5
Read only

Former Member
0 Likes
1,358

Hi Rama,

The Read the document for the BAPI, i guess it is self explantory. If you still having any problem, post again.

Regards,

Prashant.

Read only

Former Member
0 Likes
1,358

u no need to extend the BAPI. there is some work around.

1) Activate the BADI "BADI_ACC_DOCUMENT"

2) Create a structure with the following fields. let the name be "ZSAMPLE"

POSNR

HZUON

3) Fill bapi Extension parameter as follows.

*...Fill BAPI Extension Parameters.

wa_bapiparex-structure = 'ZSAMPLE'. "Structure to handle posting key

wa_bapiparex-valuepart1 = '000010'. " For first line Item number

wa_bapiparex-valuepart2 = wa_filedata-HZUON "Assignment Number for Special G/L Accounts

Append wa_bapiparex to T_bapiparex.

4) then pass the above structure to BAPI call.

Hope this helps u.

Read only

Former Member
0 Likes
1,358

Hi,

It should be something like this ValuePart1 should me the concatenation of all the fields you want to pass.

wa_extensionin-structure = 'BAPI_TE_XXXX'. -> appropriate structure

wa_extensionin-valuepart1(5) = '00001'.

wa_extensionin-valuepart1+5(1) = 'X'.

wa_extensionin-valuepart1+6(1) = ''.

wa_extensionin-valuepart1+7(1) = ''.

wa_extensionin-valuepart1+8(1) = ''.

wa_extensionin-valuepart1+9(1) = ''.

wa_extensionin-valuepart1+10(1) = ''.

APPEND wa_extensionin to it_extensionin.

rhea.

Read only

former_member206396
Active Participant
0 Likes
1,358

solved self.

Read only

0 Likes
1,358

Rama,

How do u solved this?