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: 

How to add custom fields in VA05 transaction with some conditions

I have to add customs columns in VA05.

The fields I want is

  1. VBPA-KUNNR (for VBAP-PARVW= ‘SH’)
  2. ADRC-NAME1
  3. ADRC-CITY1
  4. ADRC-REGION
1 ACCEPTED SOLUTION

RAF
Active Contributor

Hi,

can be done with optimized lists and BAdI implementation

BADI_SDOC_WRAPPER

which is mainly described in this note

https://launchpad.support.sap.com/#/notes/1780163

11 REPLIES 11

former_member1716
Active Contributor
0 Kudos

Hello shristy28,

You need to add the field to the structure VBMTVZ, this will reflect in the structure VBMTV which is the structure for VA05. You have to use the include V05TZZMO to fill the necessary fields.

Recommend you to go through the below thread as well.

THREAD

Regards!

0 Kudos

Its not working
Could you please suggest some BADI for this

0 Kudos

hi

I am also facing the same issue. I have tried all the steps no use.

Pleas advise how to get the custom fields in the va05 output.

thanks in advance

anil.g

0 Kudos

Hi Anil,
I think this option is not working on S4 if it is not working.
If you want to change this on S4, use this note as described above

1780163 - Report optimization: Access to further tables - SAP ONE Support Launchpad

0 Kudos

I have implemented the note and have added columns to the output as well as select-options. I got a new request to add carrier code: VBEP-/ERPIS/CARRIER and this creates short dumps. Sap code doesn't like the back slashes. Any ideas on this issue?

Thanks,

Pete

RAF
Active Contributor

Hi,

can be done with optimized lists and BAdI implementation

BADI_SDOC_WRAPPER

which is mainly described in this note

https://launchpad.support.sap.com/#/notes/1780163

0 Kudos

I am not able to open this link.
Could you please help me with the steps I am unable to add new fields in va05 output list

0 Kudos

Hi Robert,

I am able to add new fields to the VA05 report. But I have a problem adding VBPA-KUNNR (for VBAP-PARVW= ‘SH’)? .. Highly appreciate answer that .

0 Kudos

BADI Name: BADI_SDOC_WRAPPER Method: ADAPT_RESULT_COMP

https://launchpad.support.sap.com/#/notes/1780163

  METHOD if_badi_sdoc_wrapper~adapt_result_comp.
DATA:lt_join_metadata TYPE if_sdoc_select=>tct_join_metadata.

*---Route
INSERT VALUE #( table = 'VBAP' field = 'ROUTE' name = 'ROUTE' ) INTO TABLE ct_result_comp.
"---Route Description - Join with TVROT
CLEAR lt_join_metadata.
INSERT VALUE #( target_field = 'ROUTE' source_table = 'VBAP' source_field = 'ROUTE' ) INTO TABLE lt_join_metadata. "--Join TVROT-ROUTE to VBAP-ROUTE
INSERT VALUE #( target_field = 'SPRAS' constant_value = sy-langu ) INTO TABLE lt_join_metadata. "--Add lang for join TVROT-SPRAS to SY-LANGU
INSERT VALUE #( target_table = 'TVROT' join_metadata = lt_join_metadata ) INTO TABLE ct_additional_table_metadata. "--Join Table and condition
"---Display Route Description
INSERT VALUE #( table = 'TVROT' field = 'BEZEI' name = 'TVROT_BEZEI' text = 'Route Name' ) INTO TABLE ct_result_comp.

*---Ship To Party ( Created CDS view to get Ship to party and Name and Call that CDS view hear passing Sales Order
CLEAR:lt_join_metadata[],lt_join_metadata.
INSERT VALUE #( target_field = 'VBELN' source_table = 'VBAP' source_field = 'VBELN' ) INTO TABLE lt_join_metadata.
INSERT VALUE #( target_table = 'ZVBPAWE' join_metadata = lt_join_metadata ) INTO TABLE ct_additional_table_metadata.
"---Ship To Party Description
INSERT VALUE #( table = 'ZVBPAWE' field = 'KUNNR' name = 'VBPAWE_KUNNR' text = 'Ship-To-Party' ) INTO TABLE ct_result_comp.
INSERT VALUE #( table = 'ZVBPAWE' field = 'NAME1' name = 'VBPAWE_NAME1' text = 'Ship-To-Party Name' ) INTO TABLE ct_result_comp.

ENDMETHOD.

0 Kudos

How Can I create CDS View ZVBPAWE??

xiswanto
Active Participant
0 Kudos

CDS is created using Eclipse software ( using package ADT - so called ABAP development tools ), but you could try using the view created from SE11 instead before you proceed in creating CDS