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: 

ABAP query -finding fields

Shiva_Ram
Active Contributor
0 Kudos

Hi friends,

I would like to use ABAP query to get contract details in SD area. I have configured for value contracts (VA41), and the business needs to have a report on target value, and value released. I could not find on which table the field "AWERT" (value released), and it's associated value are stored. The F1 help says that it is from structure RV45A. Can any of you help me from which table I can pull the values?

I tried SE30, SE16, SE11 and structure 135 but of no avail. I appreciate your help and your explanation on how you arrived at.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi!

To get value of value contract already released (those in RV45A-AWERT) use FM SD_READ_CALL_OFF_VALUE:

DATA: ABWERT_VAL TYPE RV45A-AWERT.

CALL FUNCTION 'SD_READ_CALL_OFF_VALUE'

EXPORTING

I_VBELN = VBELN_VAL

I_POSNR = POSNR_VAL

IMPORTING

E_AWERT = ABWERT_VAL.

Corresponding table is S135. Here it is all the code in FM mentioned above:

DATA: BEGIN OF ABRUF.

INCLUDE STRUCTURE S135.

DATA: END OF ABRUF.

CHECK NOT I_VBELN IS INITIAL AND

NOT I_POSNR IS INITIAL.

SELECT SINGLE * FROM S135 INTO ABRUF WHERE VRSIO EQ '000' AND

WKTNR EQ I_VBELN AND

WKTPS EQ I_POSNR.

E_OAUWE = ABRUF-OAAUWE.

E_OLIWE = ABRUF-OALIWE.

E_FAKWE = ABRUF-AFAKWE.

E_AWERT = ABRUF-OAAUWE + ABRUF-OALIWE + ABRUF-AFAKWE.

E_WKWAE = ABRUF-WAERK.

E_ZWERT = ABRUF-ZWERT.

Regards,

Maxim.

6 REPLIES 6

com_2018
Participant
0 Kudos

Hi,

Use t-code:ST05

regards

collysun

Former Member
0 Kudos

These tables might be helpful....take a look...

<b>S135</b> - Value contract, target/release order

<b>OAAUWE</b> - Open released net value of order for value con

<b>OALIWE</b> - Open released net value of delivery for value

<b>KNT_WERT</b> - Contract: Value released (via release orders)

<b>UNG_WERT</b> - Contract: Unplanned released value

Former Member
0 Kudos

Hi!

To get value of value contract already released (those in RV45A-AWERT) use FM SD_READ_CALL_OFF_VALUE:

DATA: ABWERT_VAL TYPE RV45A-AWERT.

CALL FUNCTION 'SD_READ_CALL_OFF_VALUE'

EXPORTING

I_VBELN = VBELN_VAL

I_POSNR = POSNR_VAL

IMPORTING

E_AWERT = ABWERT_VAL.

Corresponding table is S135. Here it is all the code in FM mentioned above:

DATA: BEGIN OF ABRUF.

INCLUDE STRUCTURE S135.

DATA: END OF ABRUF.

CHECK NOT I_VBELN IS INITIAL AND

NOT I_POSNR IS INITIAL.

SELECT SINGLE * FROM S135 INTO ABRUF WHERE VRSIO EQ '000' AND

WKTNR EQ I_VBELN AND

WKTPS EQ I_POSNR.

E_OAUWE = ABRUF-OAAUWE.

E_OLIWE = ABRUF-OALIWE.

E_FAKWE = ABRUF-AFAKWE.

E_AWERT = ABRUF-OAAUWE + ABRUF-OALIWE + ABRUF-AFAKWE.

E_WKWAE = ABRUF-WAERK.

E_ZWERT = ABRUF-ZWERT.

Regards,

Maxim.

0 Kudos

Thank you so much Maxim Polonevich.

it worked...

Message was edited by: Shiva Ram

Former Member
0 Kudos

hi,

goto table DD03L in SE16.

give the required field name in the field name select options.

DD03L- table containing table fields and table names.

it will list all the tables containing the field.;

Former Member
0 Kudos

hi,

check the table DD03L.

It thas the field names of all tables.

give your field name in selection screen.