2008 Jun 23 3:55 AM
Hi
I am extracting all the fields from z1ychlog table and display this records in ALV. z1ychlog table contains delivery data.
Now i need to extract delivery status(using selection screen delivery number) in VBUP table.
in this case i need to check for 3 status
1. Picking status(vbup-kosta)
2.Goods Issue ( vbup-wbsta)
3.Billing status (vbup-fksta)
First i need to check Picking status. If this status is A (Not yet picked) i need to continue to check goods issue.
If this value is C, i must stop checking and tell them
Goods issue completed.
Else
i need to check Billing document status.
Any one pls help me in this.
i need to add 2 more fileds (status and remark) in ALV output
select *
into corresponding fields of table lt_z1log
from z1ychlog where
vbeln in s_vbeln
and werks in s_werks
and vkorg in s_vkorg
and vstel in s_vstel
and matnr in s_matnr
and bstnk in s_bstnk
and awbill in s_awbill
and spinvno in s_invno
and kunag in s_kunag
and lifnr in s_lifnr
and lfdat in s_lfdat
and wadat in s_wadat
and record_id in s_recid
and APPROVELNO in s_aprno
and ernam in s_ernam
and RUNDATE in s_erdat.
endform. " GET_Z1YCHLOG_DATA_ALL
2008 Jun 23 4:59 AM
create a field status in your itab and try some thing like this
select *
into corresponding fields of table lt_z1log
from z1ychlog where
vbeln in s_vbeln
and werks in s_werks
and vkorg in s_vkorg
and vstel in s_vstel
and matnr in s_matnr
and bstnk in s_bstnk
and awbill in s_awbill
and spinvno in s_invno
and kunag in s_kunag
and lifnr in s_lifnr
and lfdat in s_lfdat
and wadat in s_wadat
and record_id in s_recid
and APPROVELNO in s_aprno
and ernam in s_ernam
and RUNDATE in s_erdat.
select vbeln kosta wbsta fksta into table itab from vbup
for all entries in lt_z1log where vbeln = lt_z1log-vbeln.
if itab is not initial.
sort itab ascending by vbeln.
loop at lt_z1log.
read table itab with key vbeln = lt_z1log-vbeln transporting
kosta wbsta fksta binary search.
if sy-subrc = 0.
if itab-kosta = 'A'.
lt_z1log-status = 'Not yet picked'.
endif.
if itab-kosta = 'C'.
lt_z1log-status = 'Completed'.
endif.
if itab-kosta = 'A'.
lt_z1log-status = 'Not yet picked'.
endif.
modify lt_z1log transporting status.
clear lt_z1log.
endloop.
endif.
Hi
I am extracting all the fields from z1ychlog table and display this records in ALV. z1ychlog table contains delivery data.
Now i need to extract delivery status(using selection screen delivery number) in VBUP table.
in this case i need to check for 3 status
1. Picking status(vbup-kosta)
2.Goods Issue ( vbup-wbsta)
3.Billing status (vbup-fksta)
First i need to check Picking status. If this status is A (Not yet picked) i need to continue to check goods issue.
If this value is C, i must stop checking and tell them
Goods issue completed.
Else
i need to check Billing document status.
Any one pls help me in this.
i need to add 2 more fileds (status and remark) in ALV output
select *
into corresponding fields of table lt_z1log
from z1ychlog where
vbeln in s_vbeln
and werks in s_werks
and vkorg in s_vkorg
and vstel in s_vstel
and matnr in s_matnr
and bstnk in s_bstnk
and awbill in s_awbill
and spinvno in s_invno
and kunag in s_kunag
and lifnr in s_lifnr
and lfdat in s_lfdat
and wadat in s_wadat
and record_id in s_recid
and APPROVELNO in s_aprno
and ernam in s_ernam
and RUNDATE in s_erdat.
endform. " GET_Z1YCHLOG_DATA_ALL
2008 Jun 23 4:50 AM
2008 Jun 23 4:59 AM
create a field status in your itab and try some thing like this
select *
into corresponding fields of table lt_z1log
from z1ychlog where
vbeln in s_vbeln
and werks in s_werks
and vkorg in s_vkorg
and vstel in s_vstel
and matnr in s_matnr
and bstnk in s_bstnk
and awbill in s_awbill
and spinvno in s_invno
and kunag in s_kunag
and lifnr in s_lifnr
and lfdat in s_lfdat
and wadat in s_wadat
and record_id in s_recid
and APPROVELNO in s_aprno
and ernam in s_ernam
and RUNDATE in s_erdat.
select vbeln kosta wbsta fksta into table itab from vbup
for all entries in lt_z1log where vbeln = lt_z1log-vbeln.
if itab is not initial.
sort itab ascending by vbeln.
loop at lt_z1log.
read table itab with key vbeln = lt_z1log-vbeln transporting
kosta wbsta fksta binary search.
if sy-subrc = 0.
if itab-kosta = 'A'.
lt_z1log-status = 'Not yet picked'.
endif.
if itab-kosta = 'C'.
lt_z1log-status = 'Completed'.
endif.
if itab-kosta = 'A'.
lt_z1log-status = 'Not yet picked'.
endif.
modify lt_z1log transporting status.
clear lt_z1log.
endloop.
endif.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |