Go on link..

link us with ...

Tuesday, December 28, 2010

MM032 PHYINV PAI

*&---------------------------------------------------------------------*
*& Include ZVVF_MM032_PHYINV_0300_PAI *
*&---------------------------------------------------------------------*
*&spwizard: input module for tc 'IT_MB1A'. do not change this line!
*&spwizard: process user command
module ZVVF_MT032_PHIN_user_command input.
OK_CODE = sy-ucomm.
perform user_ok_tc using 'ZVVF_MT032_PHIN'
'g_ZVVF_MT032_PHIN_itab'
' '
changing OK_CODE.
sy-ucomm = OK_CODE.
endmodule.


*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0300 INPUT *
*&---------------------------------------------------------------------*
MODULE USER_COMMAND_0300 INPUT.

SAVE_OK = OK_CODE.

CLEAR OK_CODE.

CASE SAVE_OK.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE PROGRAM.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.

CLEAR SAVE_OK.

ENDMODULE. " USER_COMMAND_0300 INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0300_ENTE INPUT *
*&---------------------------------------------------------------------*
MODULE USER_COMMAND_0300_ENTE INPUT.

clear g_ZVVF_MT032_PHIN_itab.
PERFORM FILL_TABCNTRL.

ENDMODULE. " USER_COMMAND_0300_ENTE INPUT
*&---------------------------------------------------------------------*
*& Module check_300data INPUT *
*&---------------------------------------------------------------------*
MODULE check_300data INPUT.
SELECT SINGLE * FROM T001W
WHERE WERKS = WA_PHYINV-ZVVF_WERKS.

IF SY-SUBRC NE 0 .
MESSAGE E002(ZMM).
ENDIF.
SELECT SINGLE * FROM T001L
WHERE LGORT = WA_PHYINV-ZVVF_LGORT.

IF SY-SUBRC NE 0 .
MESSAGE E003(ZMM).
ENDIF.
ENDMODULE. " check_300data INPUT
*&---------------------------------------------------------------------*
*& Form FILL_TABCNTRL *
*&---------------------------------------------------------------------*
FORM FILL_TABCNTRL .
select * from ZVVF_MT032_PHINV
into corresponding fields
of table g_ZVVF_MT032_PHIN_itab
where ZVVF_WERKS = WA_PHYINV-ZVVF_WERKS
AND ZVVF_LGORT = WA_PHYINV-ZVVF_LGORT.
PERFORM CALC_BOOKSTOCK.
if sy-subrc = 0.
g_ZVVF_MT032_PHIN_copied = 'X'.
refresh control 'ZVVF_MT032_PHIN' from screen '0300'.
else.
message i008(ZMM).
endif.
ENDFORM. " FILL_TABCNTRL

No comments:

link us...

For Visitors

if you want to publish or Add something on ERP, SAP , SAP FUNCTIONAL, SAP ABAP then mail us along with your email-id. contain must be yours

email-id :- avinashkr_raj@yahoo.com(any email)

email-id :- avinaskr_raj.abap@blogger.com ( use only gmail)