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

ABAP query -finding fields

Shiva_Ram
Active Contributor
0 Likes
1,845

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
Read only

Former Member
0 Likes
1,311

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
Read only

com_2018
Participant
0 Likes
1,311

Hi,

Use t-code:ST05

regards

collysun

Read only

Former Member
0 Likes
1,311

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

Read only

Former Member
0 Likes
1,312

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.

Read only

0 Likes
1,311

Thank you so much Maxim Polonevich.

it worked...

Message was edited by: Shiva Ram

Read only

Former Member
0 Likes
1,311

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.;

Read only

Former Member
0 Likes
1,311

hi,

check the table DD03L.

It thas the field names of all tables.

give your field name in selection screen.