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: 

what are the tables corresponding to sales order ->parners

Former Member
0 Kudos

Hi Folks,

Can u pls let me know what are the corresponding tables n fileds for the va02->parners i.e sold to party, ship to party etc, buyer , bill to party and contact details , adress of these parners wil store.

Thanks in advance.

Regards

Rajesh

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

Get ADRNR from table VBPA for the Partner in question & the address from ADRC table.

Regards,

SUresh Datti

3 REPLIES 3

suresh_datti
Active Contributor
0 Kudos

Get ADRNR from table VBPA for the Partner in question & the address from ADRC table.

Regards,

SUresh Datti

0 Kudos

There will be a record for each partner in VBPA. You can not what is the partner functions by the field PARVW. You can see all of the partner functions from table TPAR.

Regards,

Rich Heilman

Former Member
0 Kudos

hii i am sending u the full code thta i had designed for my sales order confirmation using sap script

TABLES: VBAK,

ADRC,

VBPA,

VBAP,

SPELL.

DATA: BEGIN OF TVBAK OCCURS 0,

VBELN LIKE VBAK-VBELN,

AUDAT LIKE VBAK-AUDAT,

KUNNR LIKE VBAK-KUNNR,

VKORG like VBAK-VKORG,

END OF TVBAK.

DATA: BEGIN OF TADRC OCCURS 0,

ADDRNUMBER LIKE ADRC-ADDRNUMBER,

NAME1 LIKE ADRC-NAME1,

NAME2 LIKE ADRC-NAME2,

CITY1 LIKE ADRC-CITY1,

POST_CODE1 LIKE ADRC-POST_CODE1,

COUNTRY LIKE ADRC-COUNTRY,

KUNNR LIKE VBPA-KUNNR,

VBELN LIKE VBPA-VBELN,

END OF TADRC.

DATA:BEGIN OF TVBPA OCCURS 0,

ADRNR LIKE VBPA-ADRNR,

KUNNR LIKE VBPA-KUNNR,

VBELN LIKE VBPA-VBELN,

END OF TVBPA.

DATA: BEGIN OF TVBAP OCCURS 0,

POSNR LIKE VBAP-POSNR,

VBELN LIKE VBAP-VBELN,

MATNR LIKE VBAP-MATNR,

ARKTX LIKE VBAP-ARKTX,

KWMENG LIKE VBAP-KWMENG,

VRKME LIKE VBAP-VRKME,

NETWR LIKE VBAP-NETWR,

WAERK LIKE VBAP-WAERK,

END OF TVBAP.

DATA :W_VBELN LIKE VBAK-VBELN,

s_amount like vbap-netwr ,

amount_word LIKE SPELL.

selection-screen: begin of block b1.

select-options: s_vbeln for vbpa-vbeln no intervals no-extension.

selection-screen: end of block b1.

*AT SELECTION-SCREEN.

  • SELECT VBELN INTO W_VBELN FROM VBAK

  • WHERE VBELN IN S_VBELN.

*ENDSELECT.

START-OF-SELECTION.

SELECT VBELN AUDAT KUNNR VKORG FROM VBAK INTO CORRESPONDING

FIELDS OF

TABLE TVBAK WHERE VBELN IN

S_VBELN.

IF SY-SUBRC <> 0.

MESSAGE I398(00) WITH 'NO DATA'.

ENDIF.

SELECT NAME1 NAME2 CITY1 POST_CODE1 COUNTRY FROM ADRC INTO

CORRESPONDING

FIELDS OF

TABLE TADRC.

IF SY-SUBRC <> 0.

MESSAGE I398(00) WITH 'NO DATA1'.

ENDIF.

SELECT ADRNR KUNNR VBELN FROM VBPA INTO CORRESPONDING

FIELDS OF

TABLE TVBPA WHERE PARVW = 'WE'.

IF SY-SUBRC <> 0.

MESSAGE I398(00) WITH 'NO DATA2'.

ENDIF.

SELECT VBELN POSNR MATNR ARKTX KWMENG VRKME NETWR WAERK FROM VBAP INTO

CORRESPONDING

FIELDS OF TABLE TVBAP WHERE VBELN IN

S_VBELN.

IF SY-SUBRC <> 0.

MESSAGE I398(00) WITH 'NO DATA3'.

ENDIF.

LOOP AT TADRC.

READ TABLE TVBPA WITH KEY ADRNR = TADRC-ADDRNUMBER.

IF SY-SUBRC = 0.

MOVE TVBPA-KUNNR TO TADRC-KUNNR.

MOVE TVBPA-VBELN TO TADRC-VBELN.

MODIFY TADRC.

ENDIF.

ENDLOOP.

****reward if helpfull ******