on 11-26-2008 8:57 AM
when i am changing Delivery address for a PO in me22n manualy, changes are not reflected in print preview.
the smartform is copied from standard /SMB40/MMPO_L
to get the Delivery address i m using below code:
IF is_pekko-werks NE space.
PERFORM get_plant_address USING is_pekko-werks
CHANGING is_pekko-adrnr gs_adrc gs_sadr.
ENDIF.
related form is define in FORM ROUTINES under Global Definition.
&----
*& Form GET_PLANT_ADDRESS
&----
FORM get_plant_address USING is_werks LIKE t001w-werks
CHANGING cv_adrnr
cs_adrc LIKE addr1_val
cs_sadr LIKE sadr.
DATA: l_ekko LIKE ekko.
CHECK NOT is_werks IS INITIAL.
l_ekko-reswk = is_werks.
l_ekko-bsakz = 'T'.
CALL FUNCTION 'MM_ADDRESS_GET'
EXPORTING
i_ekko = l_ekko
IMPORTING
e_address = cs_adrc
e_sadr = cs_sadr.
cv_adrnr = cs_adrc-addrnumber.
ENDFORM. " GET_PLANT_ADDRESS
Hi
Did you save the changs and then gave print preview?? Just try doing this way. I think you should save first and then check print preview?
Vishwa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First check in the table, the record is updated or not.
If the record is changed.
try like this.
In u r Z-form write one perform.
Eg:
PERFORM ADDRESS IN PROGRAM 'Z_MM_R_MMPO'
/:Using&s_pekko-werks
/: changing&is_pekko-adrnr&
/: changing&gs_sadr&
/ :changing&gs_adrc&
ENDPERFORM
p1 : &is_pekko-adrnr&,
p1:&gs_sadr&,
p1:&gs_adrc&.
create one subroutine program in SE38.
In that write like this.
FORM ADDRESS TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
data : v_adrnr type t001w-adrnr,
v_name1 type adrc-name1,
v_name2 type adrc-name2,
name1(40) type c,
name2(40) type c,
werks(10) type c.
READ TABLE IN_TAB WITH KEY NAME = 'IS_PEKKO-WERKS'.
if sy-subrc is initial.
select single adrnr from t001ww into v_adrnr where werks = IN_TAB-VALUE.
endif.
if v_adrnr is not initial.
select single name1 name2 from adrc into (v_name1,v_name2) where adrnumber = v_adrnr.
endif.
name1 = v_name1.
name2 = v_name2.
READ TABLE OUT_TAB WITH KEY NAME = 'IS_PEKKO-ADRNR '.
if sy-subrc is initial..
OUT_TAB-VALUE = name1.
MODIFY OUT_TAB INDEX SY-TABIX.
endif.
READ TABLE OUT_TAB WITH KEY NAME = 'GS_ADRC'.
if sy-subrc is initial..
OUT_TAB-VALUE = name2.
MODIFY OUT_TAB INDEX SY-TABIX.
endif.
and soon.
Note : u must pass the character values only to the out tab.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.