05-13-2011 8:36 AM
Hi friends,
i had return the code for uploading two fields in mkpf and mseg table .when i am executing through f8 the updated value is not founding when we checkd through debugging the value is updating and appering in screen plz tell me how i will solve the issue.
for u r referenece i am sending the code what i had return in logic.
types: BEGIN OF it_tab,
prueflos(16) type c,
MBLNR type mblnr,
TYP type QAMBTYPE,
END OF it_tab.
types: begin of it_tab1.
include type mkpf.
types: END OF it_tab1.
types:begin of it_mseg.
include type mseg.
types:end of it_mseg.
* end of it_tab1.
types: ts_tab1 type STANDARD TABLE OF it_tab1.
types: ts_mseg type STANDARD TABLE OF it_mseg.
data: ts_tab type STANDARD TABLE OF it_tab,
wa_tab type it_tab,
wa_tab1 type it_tab1,
ts_tab2 type ts_tab1,
ts_mseg type ts_mseg,
wa_mseg type it_mseg,
it_tab12 type it_tab1 OCCURS 0 WITH HEADER LINE.
select PRUEFLOS mblnr typ from QAMB
into table ts_tab where prueflos = it_final-prueflos
and typ = '3'.
if ts_tab[] is not INITIAL.
sort ts_tab[] by mblnr.
select * from mkpf into TABLE ts_tab2 FOR ALL ENTRIES IN ts_tab where mblnr = ts_tab-mblnr.
if ts_tab2[] is not INITIAL.
sort ts_tab2[] by mblnr.
select * from mseg into table ts_mseg FOR ALL ENTRIES IN ts_tab2 where mblnr = ts_tab2-mblnr.
endif.
endif.
loop at ts_tab into wa_tab .
READ TABLE ts_tab2 into wa_tab1 with key mblnr = wa_tab-mblnr.
wa_tab1-FRBNR = it_data1-FRBNR.
if sy-subrc eq 0.
wait UP TO 2 SECONDS.
update mkpf from wa_tab1.
COMMIT WORK .
endif.
read table ts_mseg into wa_mseg with key mblnr = wa_tab1-mblnr.
wa_mseg-sgtxt = it_data1-trucknum.
if sy-subrc eq 0.
wait UP TO 2 seconds.
update mseg from wa_mseg.
COMMIT WORK .
endif.
ENDLOOP.
thanks in advance,
siva
Edited by: Thomas Zloch on May 13, 2011 1:37 PM - please use code tags
05-13-2011 8:44 AM
05-13-2011 9:05 AM
it's not poosible athoerwise give the solution in witch way i need to proccess
05-13-2011 9:19 AM
Hi,
Those are material documents. There is a function MB_CHANGE_DOCUMENT but the source code in it doesnt make any difference fro your code. Is it not possible through BDC ?
05-13-2011 9:25 AM
it is added in bdc code only.
now i will explaing proccess of bdc . this is used for converting meterial type from 103 movement type to 105 move ment type so whaterver data they got through 103 movemet type (migo data) they are uploading through xl and uploading through our bdc
after uploading they are used QA11
05-13-2011 9:29 AM
it is added in bdc code only.
now i will explaing proccess of bdc . this is used for converting meterial type from 103 movement type to 105 move ment type so whaterver data they got through 103 movemet type (migo data) they are uploading through xl and uploading through our bdc
after uploading they are used QA11 tcode .record is done for this after recording completed it is converting 103 to 105 move ment type and it is displaying message like succesfully proceesed . inthis 105 movement type we are not getting bill of lading no and truck no so i am updating these two field in this table so i done like this so do u get any idea to update the fields in another way means plz help me
siva.
05-13-2011 9:40 AM
Hi,
Can these two fields be mapped in any of the exits or Badi's of the recorded transaction?
05-13-2011 9:46 AM
05-13-2011 9:50 AM
What i meant is moving these two values into buffer and accessing it inside badi or customer exits and mapping it to the two fields in structures mkpf & mseg. There are customer exits availabe for this ( changing header & item of material document ). This is one option you could consider instead of directly updating the tables.
Kesav.
05-13-2011 9:59 AM