on 09-25-2012 9:28 AM
Hi,
value of NETPR from wl_inforec is not getting copied in wl_contract.
Please help.
LOOP AT li_contract INTO wl_contract.
*Start Of Change Under CR55638 By ChandPra On 24/09/2012.
IF wl_contract-pstyp EQ 2.
READ TABLE li_inforec INTO wl_inforec WITH KEY infnr = wl_contract-infnr.
IF sy-subrc IS INITIAL.
MODIFY li_contract FROM wl_contract TRANSPORTING netpr.
wl_contract-waers = wl_inforec-waers.
wl_contract-netpr = wl_inforec-netpr.
wl_contract-peinh = wl_inforec-peinh.
wl_contract-bprme = wl_inforec-bprme.
ENDIF.
ENDIF
.
Thanx in advance.
Moderator message : Not enough re-search before posting, discussion locked.
Message was edited by: Vinod Kumar
Hi,
Put this Line: MODIFY li_contract FROM wl_contract TRANSPORTING netpr.
after this line: wl_contract-netpr = wl_inforec-netpr.
So it will look like this:
LOOP AT li_contract INTO wl_contract.
*Start Of Change Under CR55638 By ChandPra On 24/09/2012.
IF wl_contract-pstyp EQ 2.
READ TABLE li_inforec INTO wl_inforec WITH KEY infnr = wl_contract-infnr.
IF sy-subrc IS INITIAL.
wl_contract-waers = wl_inforec-waers.
wl_contract-netpr = wl_inforec-netpr.
MODIFY li_contract FROM wl_contract TRANSPORTING netpr.
wl_contract-peinh = wl_inforec-peinh.
wl_contract-bprme = wl_inforec-bprme.
ENDIF.
ENDIF
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just looking at code, I think you should move inforec-netpr to contrct-netpr before Modify statement.
however, I suggest not to get spoon feeding here. This is not a question, it just need some to and fro ..trial and error on your problem....
Thanks and Regards,
Ravindra Sonar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is getting copied for sure. But I think the execution is at wrong place.
I think pstyp is caharcter field.
Change the line
IF wl_contract-pstyp EQ 2.
to
IF wl_contract-pstyp EQ '2'.
and
Do This
*MODIFY li_contract FROM wl_contract TRANSPORTING netpr. "Delete this line
wl_contract-waers = wl_inforec-waers.
wl_contract-netpr = wl_inforec-netpr.
wl_contract-peinh = wl_inforec-peinh.
wl_contract-bprme = wl_inforec-bprme.
MODIFY li_contract FROM wl_contract TRANSPORTING netpr.
Since you are using transporting NETPR, only NETPR in table LI_CONTRACT internal table will be updated
Hope it helps.
Regards,
R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.