Include LV09AF20
FORM PARTNER_ON_POS_EXISTS USING FIT_XVBPA TYPE LV09A_TY_XVBPA
FIF_PARVW TYPE PARVW_4
FIF_NRART LIKE TPAR-NRART
FIF_PARNR
FIF_POSNR LIKE VBPAV-POSNR
FIF_OBJECTKEY type SWO_TYPEID
CHANGING FEF_XVBPA_INDEX LIKE SY-TABIX
FEF_POSNR LIKE VBPAV-POSNR.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form PARTNER_ON_POS_EXISTS, Start A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZVBAP_KUNNR_UPDATE_DP91_V4. "active version
******** added by chellam - 15.06.2015
IF SY-TCODE = 'DP91' OR SY-TCODE = 'VA02' OR SY-TCODE = 'VA03' .
IF SY-DYNNR = 1000.
*break testabap.
DATA : LV_KUNNR TYPE KNA1-KUNNR,
lv_vbeln type vbak-vbeln.
DATA : LS_XVBPA LIKE LINE OF FIT_XVBPA,
LV_POSNR TYPE VBAP-POSNR.
get PARAMETER ID 'AUN' FIELD lv_vbeln.
*get PARAMETER ID 'APO' FIELD lv_item.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = lv_vbeln
IMPORTING
OUTPUT = lv_vbeln.
LOOP AT FIT_XVBPA INTO LS_XVBPA.
SELECT SINGLE KUNNR POSNR FROM VBPA INTO (LV_KUNNR,LV_POSNR)
WHERE VBELN = lv_vbeln
AND POSNR <> 0
AND PARVW = LS_XVBPA-PARVW.
IF LV_POSNR IS INITIAL.
LS_XVBPA-KUNNR = LS_XVBPA-KUNNR.
LS_XVBPA-adrnp = LS_XVBPA-ADRNR.
ELSEIF LV_POSNR IS NOT INITIAL.
LS_XVBPA-KUNNR = LV_KUNNR.
SELECT SINGLE ADRNR FROM KNA1 INTO (LS_XVBPA-adrnr)
WHERE KUNNR = LS_XVBPA-KUNNR.
ENDIF.
MODIFY FIT_XVBPA FROM LS_XVBPA INDEX SY-TABIX TRANSPORTING KUNNR ADRNR.
ENDLOOP.
ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
Function Module SD_PARTNER_DATA_GET enhancement
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module SD_PARTNER_DATA_GET, End A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZVBAP_KUNNR_UPDATE_DP91_V4. "active
IF SY-TCODE = 'DP91' OR SY-TCODE = 'VA02' OR SY-TCODE = 'VA03' .
IF SY-DYNNR = 1000.
*break testabap.
DATA : LV_KUNNR TYPE KNA1-KUNNR,
lv_vbeln type vbak-vbeln.
DATA : LS_XVBPA LIKE LINE OF FET_XVBPA,
LV_POSNR TYPE VBAP-POSNR.
get PARAMETER ID 'AUN' FIELD lv_vbeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = lv_vbeln
IMPORTING
OUTPUT = lv_vbeln.
LOOP AT FET_XVBPA INTO LS_XVBPA.
SELECT SINGLE KUNNR POSNR FROM VBPA INTO (LV_KUNNR,LV_POSNR)
WHERE VBELN = lv_vbeln
AND POSNR <> 0
AND PARVW = LS_XVBPA-PARVW.
IF LV_POSNR IS INITIAL.
LS_XVBPA-KUNNR = LS_XVBPA-KUNNR.
LS_XVBPA-adrnp = LS_XVBPA-ADRNR.
ELSEIF LV_POSNR IS NOT INITIAL.
LS_XVBPA-KUNNR = LV_KUNNR.
*BREAK TESTABAP.
SELECT SINGLE ADRNR FROM KNA1 INTO (LS_XVBPA-adrnr)
WHERE KUNNR = LS_XVBPA-KUNNR.
ENDIF.
MODIFY FET_XVBPA FROM LS_XVBPA INDEX SY-TABIX TRANSPORTING KUNNR ADRNR.
ENDLOOP.
FET_XVBPA_ACTUAL[] = FET_XVBPA[].
FET_YVBPA[] = FET_XVBPA[].
FET_YVBPA_ACTUAL[] = FET_YVBPA[].
ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
ENDFUNCTION.
*************************************************************************
Include LV09CF29
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form UPDATE_DATA_FROM_V09A, End A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZVBAP_KUNNR_UPDATE_DP91_V2. "active version
******** added by chellam - 15.06.2015
IF SY-TCODE = 'DP91' AND SY-DYNNR = 1000 AND SY-UNAME = 'ABAP'.
DATA : LV_KUNNR TYPE KNA1-KUNNR,
lv_vbeln type vbak-vbeln.
DATA : LS_XVBPA LIKE LINE OF lt_xvbpa,
LV_POSNR TYPE VBAP-POSNR.
get PARAMETER ID 'AUN' FIELD lv_vbeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = lv_vbeln
IMPORTING
OUTPUT = lv_vbeln.
LOOP AT lt_xvbpa INTO LS_XVBPA.
SELECT SINGLE KUNNR POSNR FROM VBPA INTO (LV_KUNNR,LV_POSNR)
WHERE VBELN = lv_vbeln
AND POSNR <> 0
AND PARVW = LS_XVBPA-PARVW.
IF LV_POSNR IS INITIAL.
LS_XVBPA-KUNNR = LS_XVBPA-KUNNR.
LS_XVBPA-adrnp = LS_XVBPA-ADRNR.
ELSEIF LV_POSNR IS NOT INITIAL.
LS_XVBPA-KUNNR = LV_KUNNR.
*BREAK TESTABAP.
SELECT SINGLE NAME1 ADRNR FROM KNA1 INTO (LS_XVBPA-name1,LS_XVBPA-adrnr)
WHERE KUNNR = LS_XVBPA-KUNNR.
ENDIF.
MODIFY lt_xvbpa FROM LS_XVBPA INDEX SY-TABIX TRANSPORTING KUNNR NAME1 ADRNR.
ENDLOOP.
gt_xvbpa[] = lt_xvbpa[].
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
ENDFORM. " UPDATE_DATA_FROM_V09A
No comments:
Post a Comment