Skip to Content
0
Former Member
Oct 05, 2009 at 07:28 AM

Very Unusual problem in ABAP - Working in DEV ser not working in Quality

23 Views

Hi ,

I am geting very unusual problem . My program runs well in Development server and fetching the correct data of Customer address. When i transport my program to Quality , its fetching the incorrect data .

The code where its getting the incorrect data in Quality server is :

In the Read table statement : fp_in_tab WITH KEY name = c_j1irg23d-vbeln

Its picking the wrong value of delivery doc no (vbeln ) . where as its picking absolutely correct in dev server

******************

FORM get_consignee_address TABLES fp_in_tab STRUCTURE itcsy

fp_out_tab STRUCTURE itcsy.

*

DATA : ld_j_1irg23d-vbeln LIKE j_1irg23d-vbeln.

  • Variable to hold ECC No of Consignee

DATA : ld_kunnr LIKE vbpa-kunnr, "CUSTOMER

w_c_name1 LIKE kna1-name1,

w_c_name2 LIKE kna1-name2,

w_c_stras LIKE kna1-stras,

w_c_ort01 LIKE kna1-ort01,

ld_parvw TYPE parvw,

w_c_pstlz LIKE kna1-pstlz,

w_c_land1 LIKE kna1-land1,

w_c_regio LIKE kna1-regio.

*Clears the local variables.

CLEAR: fp_in_tab-value,

sy-tabix,

ld_j_1irg23d-vbeln,

ld_parvw,

ld_kunnr.

READ TABLE fp_in_tab WITH KEY name = c_j1irg23d-vbeln .

IF sy-subrc EQ 0.

ld_j_1irg23d-vbeln = fp_in_tab-value.

ENDIF.

*To pad leading ZERO'S in Document No

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = ld_j_1irg23d-vbeln

IMPORTING

output = ld_j_1irg23d-vbeln.

  • to get kunnr from vbpa TABLE

SELECT SINGLE kunnr

INTO ld_kunnr

FROM vbpa

WHERE vbeln = ld_j_1irg23d-vbeln

AND parvw = 'WE'.

if sy-subrc ne 0.

SELECT SINGLE kunnr

INTO ld_kunnr

FROM vbpa

WHERE vbeln = ld_j_1irg23d-vbeln

AND parvw = 'SP'.

endif.

If sy-subrc = 0.

  • To get name1, name2 , stras, ort01 from kna1 table

SELECT SINGLE name1 name2

stras ort01

pstlz land1

regio

INTO (w_c_name1, w_c_name2 ,

w_c_stras ,w_c_ort01,

w_c_pstlz, w_c_land1,

w_c_regio )

FROM kna1

WHERE kunnr = ld_kunnr.

endif.

IF sy-subrc = 0.

CLEAR fp_out_tab.

  • ** * To get Consignee name1

READ TABLE fp_out_tab WITH KEY name = 'W_C_NAME1' .

IF sy-subrc EQ 0.

MOVE w_c_name1 TO fp_out_tab-value.

MODIFY fp_out_tab INDEX sy-tabix.

ENDIF.