Application Development 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: 

extension fields with bapi 'BAPISORDER_GETDETAILEDLIST'

Former Member
0 Kudos

Hello,

I want to get values of extensions fields of vbap with bapi 'BAPISORDER_GETDETAILEDLIST'.

Is there anyone know how to do that? How to fill extensionout table?

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I think you will get the extension values in the structure EXTENSIONOUT of the function module. You need to read the EXTENSIONOUT table for the field STRUCTURE with the append structure name for VBAP.

Execute the function and see what you get in the table EXTENSIONOUT.

-Kiran

5 REPLIES 5

Former Member
0 Kudos

Hi,

I think you will get the extension values in the structure EXTENSIONOUT of the function module. You need to read the EXTENSIONOUT table for the field STRUCTURE with the append structure name for VBAP.

Execute the function and see what you get in the table EXTENSIONOUT.

-Kiran

Former Member
0 Kudos

Hi,

Thanks for your answer.

I've made what you've told me. But I think I have a problem. After debugging, I saw a select on DD02L with key BAPE_VBAP and TAB_CLASS = 'APPEND'. But in DD02L, i've got TAB_CLASS = 'INTTAB'. That's why I have nothing at the end of the Bapi.

I should have a problem of custo ?!

0 Kudos

Hello Frederic,

just tested this one on a Rel.4.7-System.

BAPE_VBAP is a structure ('INITAB' in DD02L) -that's correct.

Just filled the Parameters:

I_BAPI_VIEW-Item = 'X'

SALES_DOCUMENT-VBELN = <Salesdoc-number>

EXTENSIONOUT-STRUCTURE = 'BAPE_VBAP'.

All worked fine. On which release do you work ?

Regards Wolfgang

Former Member
0 Kudos

Hi Wolfgang,

I work on SAP R/3 Enterprise with SAP_BASIS 620 and SAP_APPL 470.

I've just send an OSS message ! So, don't search for this topic for the moment..

Thanks all.

Former Member
0 Kudos

Hi

I haven't that BAPI on my release (4.6C), but I suppose the parameter extensionout is like BAPIPAREX.

The structures for extensions are:

- BAPE_VBAK: for header

- BAPE_VBAP: for item

- BAPE_VBEP: for scheduls

So BAPE_VBAP is yours.

The system dosen't move all Z-FIELD from VBAP to BAPE_VBAP, but only fields are in structure VBAPKOZ.

So you should insert your Z-FIELD of VBAP into VBAPKOZ.

After I suppose the system automatically fill extensionout and so:

LOOP AT extensionout.

CASE extensionout-STRUCTURE.

WHEN 'BAPE_VBAK'.

MOVE extensionout TO BAPE_VBAK.

WHEN 'BAPE_VBAP'.

MOVE extensionout TO BAPE_VBAP.

  • Here you can read the z-field and assign them to their *item:

READ TABLE T_VBAP WITH KEY VBELN = BAPE_VBAP-VBELN

POSNR = BAPE_VBAP-POSNR.

......................................................

WHEN 'BAPE_VBEP'.

MOVE extensionout TO BAPE_VBEP.

ENDCASE.

ENDLOOP.

Max