2 tablecontrols in screens
HI Abapers,
Please help me out from the following situation...
Here i have one screen called 1000. in that i hav to include 2 table controls . so is it possible to use 2 table controls in a single screen. If possible please give me one example.
Thanks in Advance.....
Hi,
<b>Please checkout sample program ==> RSDEMO02</b>
table controls
check demo program.
RSDEMO_TABLE_CONTROL
how to modify and save the data in the table control
Regards, ABY
Similar Messages
-
How to Update&Delete a field in a record of tablecontrol in screens
Hi,
I have one requirement in table control of Modulepool Programming. I want 2 put 2 pushbuttons as "Delete","Update" in Tablecontrol Screen.when ever i select a record that time i want 2 delete that and i have 2 update particular value on tablecontrol itself and that reflects the custom tableModerator message - duplicate post locked
Rob -
How to hide a entire tablecontrol without using subscreen....
hiiiiiii
iam using input/out and tablecontrol in screen 100...my input/output field is matnr.. before entering matnr tablecontrol should not visible....i.e i want entire tablecontrol to hide not particular column....n tablecontrol is hide.... when iam entering matnr tablecontrol should visible.....
how to visible and invisible a tablecontrol without using subscreen.....is tre a way to do it...
table-invisible = 'x'.
where table is name of tablecontrol n it hides the tablecontrol... but again after entering matnr how to make tablecontrol visible....
if any one knows how to do it pls help....
rewards if any tell correctly.......
thanks...In screen painter, open the table control attributes, enter the some value in group column.
ex:
PROCESS BEFORE OUTPUT.
MODULE SCR_INIT.
*& Module SCR_INIT OUTPUT
text
MODULE SCR_INIT OUTPUT.
LOOP AT SCREEN.
if g_auth = 'BM'.
if screen-group1 = 'GR1'.
SCREEN-ACTIVE = '0'.
SCREEN-INPUT = '0'.
endif.
modify screen.
endloop. -
How to enhance table control in DMS. Need to display doknr more than 25 cha
Hi there.
In transaction IL03 - document tab - I need to display a doknr which is longer than 25 characters.
I search for exit/enhancement for DMS - saplcv140/control SUB_DOC, but cant find anything.
If it is not possible to enhance this field, i would like to add a new field (more than 25 char) and fill in the long doknr.
The documents that are attached contains both an internal docnumber(from the external system) and an external docnumber (functional location type of number). It is very important to show external documentno in the table control.
Actually in the table DRAW the external dok number is in the field MRK_FILEP. Can this field somehow get in the tablecontrol?
Anybody has experience with docno longer than 25 characters? Or how to enhance tablecontrol sub_doc (screen 0204) in fuction group CV140.
Br,
Liselotte.The BAdI CRM_BADI_RF_Q1O_SEARCH is for enhancing OneOrder based searches. Not for business partners.
The BAdI CRM_BUPA_IL_SEARCH is the way to go. I just checked in our system.
In the method SEARCH_CRITERIA_INITIAL check if your field is supplied in IS_PARAMETERS. If yes return CV_IS_NOT_INITIAL = 'X'.
Then in SEARCH_PARTNERS you delete the entries from table CT_PARTNER_KEYS according to your parameter.
However this is not very performant. If you have a search with criteria only of your own for the BAdI SAP coding will first select everything and then you filter out.
Anyway, it is much faster to implement than a new search...
cheers Carsten
Edited by: Carsten Kasper on Nov 18, 2008 7:44 PM -
Hey
i want more information about tablecontrol.
In tablecontrol at screen.
1.want to display tablecontrol retriving value from table zmw0001.
i dont know how to do this.
2- how to do sort option in tablecontrol.
3-if select particular row from tabctrl and click the appl toolbar push button,
Record in tabcontrol has to be updated.
could you pls give me idea to do this.
if you reference material to do pls refer me.
ambichan.i have create tabcontrol using wizard
and it creates like this automatically.
TYPES: BEGIN OF T_ZTABCTRLOBJ,
TRKORRNUM LIKE ZMW0001-TRKORRNUM,
CLIENT LIKE ZMW0001-CLIENT,
IMPORTDAY LIKE ZMW0001-IMPORTDAY,
CONVERTFILENAME LIKE ZMW0001-CONVERTFILENAME,
TRANSNO LIKE ZMW0001-TRANSNO,
EXETIMING LIKE ZMW0001-EXETIMING,
PRETRKORRNUM LIKE ZMW0001-PRETRKORRNUM,
IMPRETURNCODE LIKE ZMW0001-IMPRETURNCODE,
STATUS LIKE ZMW0001-STATUS,
HOLD LIKE ZMW0001-HOLD,
MEMO LIKE ZMW0001-MEMO,
JOBNAME LIKE ZMW0001-JOBNAME,
JOBCOUNT LIKE ZMW0001-JOBCOUNT,
UDATE LIKE ZMW0001-UDATE,
UTIME LIKE ZMW0001-UTIME,
FLAG,
END OF T_ZTABCTRLOBJ.
INTERNAL TABLE FOR TABLECONTROL 'ZTABCTRLOBJ'
DATA: G_ZTABCTRLOBJ_ITAB TYPE T_ZTABCTRLOBJ OCCURS 0,
G_ZTABCTRLOBJ_WA TYPE T_ZTABCTRLOBJ,
G_ZTABCTRLOBJ_COPIED.
DECLARATION OF TABLECONTROL 'ZTABCTRLOBJ' ITSELF
CONTROLS: ZTABCTRLOBJ TYPE TABLEVIEW USING SCREEN 0300.
LINES OF TABLECONTROL 'ZTABCTRLOBJ'
DATA: G_ZTABCTRLOBJ_LINES LIKE SY-LOOPC.
DATA: TABIX LIKE ZTABCTRLOBJ-CURRENT_LINE.
DATA WA TYPE CXTAB_COLUMN.
AT PAI
WHEN 'SORT'.
DATA: FLDNAME(100),HELP(100).
READ TABLE G_ZTABCTRLOBJ_ITAB-COLS INTO WA WITH KEY SELECTED = 'X'.
SPLIT COL-SCREEN-NAME AT '-' INTO HELP FLDNAME.
SORT G_ZTABCTRLOBJ_ITAB BY (FLDNAME). (i matched ur code with my code
but i am not sure its correct. it gives error during compilation.)
IT SAYS "G_ZTABCTRLOBJ_ITAB IS A TABLE WITHOUT A HEADERLINE AND THEREFORE HAS
NO COMPONENT CALLED 'COLS'"
ambichan. -
hey guys,
I want to make record level lock for the user entered in the screen Simultaneously.
I have change button and Tablecontrol in screen.
when user enter VBELN and Other values and execute, the retrieved values from
internal table will be popupated in table control at next screen 9100.
I want to lock other user whom tries to make change in this screen or <b>(when he clicks change button in screen)</b>
i did below logic and its not working for me..could you pls help me out.
MAIN PROGRAM******************************************************
SELECT-OPTIONS:S_WADAT FOR LIKP-WADAT_IST.
SELECT-OPTIONS:S_KUNAG FOR LIKP-KUNAG.
SELECT-OPTIONS:S_KUNNR FOR LIKP-KUNNR.
SELECT-OPTIONS:S_LGORT FOR LIPS-LGORT
MATCHCODE OBJECT ZMLG.
SELECT-OPTIONS:S_VGBEL FOR LIPS-VGBEL.
SELECT-OPTIONS:S_VBELN FOR LIKP-VBELN.
SELECT-OPTIONS:S_POSNR FOR LIPS-POSNR.
SELECT-OPTIONS:S_ZBUNK FOR ZSDTB_LOT-ZBUNKTU.
<b>START-OF-SELECTION.</b>
CLEAR:FLG_CHG,
FLG_UPD.
FLG_SAV = C_ON.
<b>PERFORM SEL_DATA.</b> <i>"Fetches data and put into internal table IT_DATA.</i>
CLEAR W_LINE.
DESCRIBE TABLE IT_DATA LINES W_LINE.
IF W_LINE = 0.
MESSAGE ID 'ZPP' TYPE 'S' NUMBER '011'.
ELSE.
<b> CALL SCREEN '9100'. </b>
ENDIF.
PERFORM DEQ_TBL.
FORM SEL_DATA.
STORED VALUES INTERNAL TABLE IT_DATA.
ENDFORM.
*WHEN USER CLICK CHANGE BUTTON in APPLICATION BAR>
MODULE USER_COMMAND_9100 INPUT.
CASE OK_CODE.
WHEN 'CSCG'. "Change button
IF FLG_CHG = C_ON.
CLEAR:FLG_CHG,FLG_SAV.
LOOP AT IT_DATA INTO WA_DATA.
AT END OF VBELN.
<b> PERFORM ENQ_TBL USING WA_DATA.
IF FLG_ERR = C_ON.
EXIT.
ENDIF.</b>
ENDAT.
ENDLOOP.
IF FLG_ERR = C_ON.
<b>MESSAGE ....<.INFORMATION ERROR VBELN LOCKED></b> ENDIF.
IF FLG_UPD = C_ON.
PERFORM INSERT_TBL.
ENDIF.
ELSE.
FLG_CHG = C_ON.
ENDIF.
WHEN 'SAVE'.
IF FLG_UPD = C_ON.
PERFORM INSERT_TBL.
ENDIF.
ENDCASE.
ENDMODULE.
<b>FORM ENQ_TBL USING I_VBELN.
CLEAR FLG_ERR.
CALL FUNCTION 'ENQUEUE_EZSDTB_LOT'
EXPORTING
MODE_ZSDTB_LOT = 'E'
MANDT = SY-MANDT
VBELN = I_VBELN
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
FLG_ERR = C_ON.
ENDIF.</b>ENDFORM. " ENQ_TBLhi, please descript more details on where the problem is.
Specially the symptom of your problem.
if you want to keep the exclusive access on thoes record, other application should also call 'ENQUEUE_EZSDTB_LOT' to try to get the access authority.
if no, your lock won't be effective.
And if the other application will be runned by a same user account in the SAP sever, you also should check the 'lock mode' of the lock object.
It is cumulative or not.
It's important, because Exclusive locks can be requested by the same transaction more than once and handled successively, but an exclusive but not cumulative lock can only be requested once by a given transaction. All other lock requests are rejected.
Hope it will be helpful
thanks -
PO confirmation tablecontrol screen change in ME2*N transactions
Hi Experts,
My client's business require me to add one new columns in PO item level confirmataion table control screen in ME21N,ME22N,ME23N transactions.
These column field(ZZ*) is to be taken from EKES table under append structure.
Any inputs how to proceed further.
Thanks in advance.
Muru.P.Hi Neha,
Thanks for your quick reply.
I want to enhance existing table control screen (Standard)where will come under PO item confirmation tab in ME2*N transactions.This table control reference from EKES table. Already i appended customized field in this table. Now i want to add one more column in this table control screen using any screen exits or BADIs.Is it feasible or not? if it is feasible,Pls give me further steps..
Thanks.
Muru.P. -
Hi Friends,
I want to do a calculation in the input screen which I have created. ie., the amount field should be rate field * qty field. I am getting this value, but the problem I am facing is that, whe the qty is changed, it creates another line with changed qty as well as amount.
Could you pls guide me with corrections.
The code I have written, are as follows:
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'RATE'
LOOP AT IT_RATE.
CHAIN.
FIELD ZTDRDMG-MATRL.
FIELD ZTDRDMG-DMQTY.
FIELD ZTDRDMG-CLRAT.
FIELD ZTDRDMG-CLAMT.
MODULE RATE_MODIFY ON CHAIN-REQUEST.
endchain.
ENDLOOP.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
MODULE RATE_MODIFY INPUT.
MOVE-CORRESPONDING ZTDRDMG TO G_IT_RATE_WA.
MODIFY IT_RATE
FROM G_IT_RATE_WA "IT_RATE
INDEX RATE-CURRENT_LINE.
g_it_rate_wa-clamt = g_it_rate_wa-dmqty * g_it_rate_wa-clrat.
APPEND G_IT_RATE_WA TO IT_RATE.
ENDMODULE. "RATE_MODIFY INPUT
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Kindly guide me with a solution.
TIA.
Regards,
Mark Ktry like this.
screen flow logic.
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL <CONTROL NAME>.
MODULE READ_TABLE.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL <CONTROL NAME>
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE READ_TABLE.
READ TABLE <ITAB> INDEX <CONTROL>-CURRENT_LINE.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ITAB TO ZTDRDMG.
ELSE.
<EXIT FROM LOOP>.
ENDIF.
ENDMODULE.
MODULE MODIFY_ITAB.
MOVE-CORRESPONDING ZTDRDMG TO <ITAB>
<DO THE CALCULATION>.
MODIFY ITAB INDEX <CONTROL>-CURRENT_LINE.
ENDMODULE.
hope this will help
regards
shiba dutta -
Table control in Screen Painter
Hi Friends,
I have created a screen using screen painter. The screen is having 4 tabs (subscreen) and in all the subscreen, i have used table control to insert multiple lines in the table.
The problem I am getting is that, the data of table control part is not getting inserted into the table.
The program part is given below for reference.
======================================================
PROCESS BEFORE OUTPUT.
MODULE SECDAM_CHANGE_TC_ATTR.
LOOP AT IT_SECDAM
INTO IT_SECDAM
WITH CONTROL SECDAM
CURSOR SECDAM-CURRENT_LINE.
MODULE SECDAM_GET_LINES.
ENDLOOP.
MODULE STATUS_0109.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'SECDAM'
LOOP AT IT_SECDAM.
CHAIN.
FIELD ZTDRDTL-DIVSN.
FIELD ZTDRDTL-MATRL.
FIELD ZTDRDTL-SLQTY.
FIELD ZTDRDTL-DMQTY.
FIELD ZTDRDTL-SSQTY.
MODULE SECDAM_MODIFY ON CHAIN-REQUEST.
endchain.
ENDLOOP.
MODULE SECDAM_USER_COMMAND.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Flow-logic part:
DATA : BEGIN OF IT_SECDAM OCCURS 0,
DIVSN LIKE ZTDRDTL-DIVSN,
MATRL LIKE ZTDRDTL-MATRL,
SLQTY LIKE ZTDRDTL-SLQTY,
DMQTY LIKE ZTDRDTL-DMQTY,
SSQTY LIKE ZTDRDTL-SSQTY,
END OF IT_SECDAM.
CONTROLS: SECDAM TYPE TABLEVIEW USING SCREEN 0109.
DATA: G_SECDAM_LINES LIKE SY-LOOPC.
MODULE SECDAM_CHANGE_TC_ATTR OUTPUT.
DESCRIBE TABLE IT_SECDAM LINES SECDAM-LINES.
ENDMODULE. "SECDAM_CHANGE_TC_ATTR OUTPUT
MODULE SECDAM_GET_LINES OUTPUT.
G_SECDAM_LINES = SY-LOOPC.
ENDMODULE. "SECDAM_GET_LINES OUTPUT
MODULE SECDAM_MODIFY INPUT.
MODIFY IT_SECDAM
FROM IT_SECDAM
INDEX SECDAM-CURRENT_LINE.
ENDMODULE. "SECDAM_MODIFY INPUT
MODULE SECDAM_USER_COMMAND INPUT.
OK_CODE = SY-UCOMM.
PERFORM USER_OK_TC USING 'SECDAM'
'IT_SECDAM'
CHANGING OK_CODE.
SY-UCOMM = OK_CODE.
ENDMODULE. "SECDAM_USER_COMMAND INPUT
=========================================================
Kindly guide me the solution.
TIA.
Regards,
Mark KHi
Try like this may be you will get it.
process before output.
module status_1000.
loop at itab with control tabctrl cursor tabctrl-top_line.
module assign_data.
endloop.
process after input.
module user_command_1000.
loop at itab.
endloop.
In flow logic.
tables vbak.
data itab like vbak occurs 0 with header line.
controls tabctrl type tableview using screen 1000.
data fill type i.
*& Module Assign_data OUTPUT
text
module assign_data output.
move itab to vbak.
endmodule. " Assign_data OUTPUT
*& Module USER_COMMAND_1000 INPUT
text
module user_command_1000 input.
case sy-ucomm.
when 'EXIT'.
set screen 0.
endcase.
endmodule. " USER_COMMAND_1000 INPUT
*& Module STATUS_1000 OUTPUT
text
module status_1000 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
select * from vbak into table itab.
describe table itab lines fill.
tabctrl-lines = fill.
Endmodule.
Regards
Haritha. -
Screen Programming(Module Pool ) using Abap Objects
Hi gurus.,
I need to create a module pool program with tabstrips and tablecontrols using Abap objects...plz guide me how i can achieve this... i am very much confused.. i dont know how and where to start .. plz send me documents and sample codes related to this topic..Also hoe i can implement f4 help in screen fields..
Regards.,
S.SivakumarHi Sivakumar,
Go through the following links:
[url]http://www.savefile.com/download/156691?PHPSESSID=c49d6bed6630d830f3270f7eab51e547 [url]
[url]http://www.sapdb.info/category/sap-ebooks[url]
[url]http://sap.niraj.tripod.com/id25.html[url]
[url]http://abaplovers.blogspot.com/2008/03/sap-abap-tutorial-module-pool_17.html[url]
Thank you,
Prasad G.V.K
Edited by: Craig Cmehil on Jul 1, 2008 9:48 PM -
Report without a selection-screen, just a dynpro
Hi experts,
I wrote a small report, which reads out a file. After this I want to display it in a tablecontrol of my dynpro. In the dynpro there is a button to push the data of the tablecontrol in the R/3 via BDC.
Now I have the problem of a automatic generated Selection-Screen. Which has some fields of my used variables (e.g. file-name, file-typ) and even maybe 10 fields (input-fields and checkboxes) from the BDC program.
The fact is that it is not possible to use this code, simply without any "START-OF-SELECTION" statement:
REPORT ZMM_REPORT01.
TABLES: mseg.
TYPES: BEGIN of input_struk,
matnr TYPE mseg-matnr,
erfmg TYPE mseg-erfmg,
END of input_struk,
tt_input TYPE TABLE OF input_struk.
DATA: it_input TYPE tt_input.
DATA: wa_input LIKE LINE OF it_input.
CALL SCREEN 100.
The error is: "Statement 'CALL SCREEN 100' couldnt be reached."
If I use the program-type M for PROGRAM and not type 1 for REPORT. Then fails with the necessary INCLUDE statement of the BDC program.
Regards,
Steffenok, if I decode your big letters, I have to put the CALL SCREEN at the end of my program.
so I do that but I didn't work . error: the call-statement could be reached.
REPORT ZMM_REPORT01.
TABLES: mseg.
TYPES: BEGIN of input_struk,
matnr TYPE mseg-matnr,
erfmg TYPE mseg-erfmg,
END of input_struk,
tt_input TYPE TABLE OF input_struk.
DATA: it_input TYPE tt_input.
DATA: wa_input LIKE LINE OF it_input.
PARAMETERS: fname TYPE rlgrap-filename DEFAULT 'c:lagerver.dat',
ftype TYPE rlgrap-filetype DEFAULT 'ASC',
bwart TYPE MSEG-BWART DEFAULT 201,
werks TYPE MSEG-WERKS DEFAULT 2000,
lgort TYPE MSEG-LGORT DEFAULT 2500,
kostl TYPE COBL-KOSTL DEFAULT 201300.
START-OF-SELECTION.
* PBO Module
MODULE pbo_0100 OUTPUT.
SET TITLEBAR 'TITLE_100'.
SET PF-STATUS 'SCREEN_100'.
PERFORM z_daten_input.
PERFORM z_convert_dummy.
ENDMODULE.
* PAI Module
MODULE pai_0100 INPUT.
IF sy-ucomm = 'BACK' OR
sy-ucomm = 'EXIT' OR
sy-ucomm = 'CANCEL'.
LEAVE PROGRAM.
ELSE.
DATA: l_date TYPE sy-datum.
>THE BDC PROGRAM statements<
ENDIF.
ENDMODULE.
FORM z_daten_input.
DATA: filename TYPE string, " UNICODE
result TYPE boolean.
filename = fname.
REFRESH: it_input.
CALL METHOD cl_gui_frontend_services=>file_exist
EXPORTING file = filename
RECEIVING RESULT = result.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
filename = filename
filetype = 'ASC'
READ_BY_LINE = 'X'
REPLACEMENT = '#'
CHANGING
data_tab = t_dummy[].
ENDFORM.
FORM z_convert_dummy.
LOOP AT T_DUMMY.
wa_input-matnr = T_DUMMY-VAR+0(11).
wa_input-erfmg = T_DUMMY-VAR+33(5).
APPEND wa_input TO it_input.
ENDLOOP.
ENDFORM.
*&spwizard: declaration of tablecontrol 'TC_FILE' itself
controls: TC_FILE type tableview using screen 0100.
*&spwizard: output module for tc 'TC_FILE'. do not change this line!
*&spwizard: update lines for equivalent scrollbar
module TC_FILE_change_tc_attr output.
describe table IT_INPUT lines TC_FILE-lines.
endmodule.
CALL SCREEN 100. -
How to use 'Find' menu in Screens
Hi all,
I wanted to know how to use 'Find' menu in screens.
Actually I have created a screen through SE51 and used the pushbutton to assign the function 'Find' ( one with binoculars ). The screen uses a table control to bring all the data from the DB table in the PBO module. When the user uses FIND button the system should prompt a search pop up screen onto which he will enter the search parameter and when he enter that the corresponding line item should be displayed on the tablecontrol. I wanted to know what logic should be incorporated in the program if that pushbutton is used. Please reply immediately. Its urgent.
Regards,
Bhavani.
Edited by: BHAVANI MADIREDDY on Apr 1, 2008 12:31 PMHello,
In the PAI under a module (user_command for example) when the user click the button you should use the command READ TABLE (if you look at the help, there's some options to do the READ dynamically - [http://help.sap.com/saphelp_nw04/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm]) to get the line index and with it you set the TOP_LINE of the table control ( tc_table-top_line = sy-index for example).
Doing this the selected line will be the first in the table control on the next step (PAI/PBO).
Regards, -
Missing lines in tablecontrol display
Hello,
I have a strange problem:
I have a Screen with different table controls.
In the Layout Editor i set the size of all the tablecontrols to show 3 Lines ( fiixed size ).
Everything seems to be ok.
But when i execute the Program,
a few of these Table Controls are only showing 2 Lines.
There is no additional Coding to hide the lines.
Any idea, what problem we have.
Thanks in advance for any ideas,
UliHy,
Sorry, thats not helping me.
It's not really a programming problem.
I do not want to resize the TC in the Program.
I just want the Screen to appear how it is designed in the Editor.
There is no Programming in the Program to change the TC, only in editing mode a few empty lines are added.
I think, it's a kind of generation problem.
Thx for your answer anyway,
Uli -
How to clear the fields of the screen ?
Hi,
I'm having two fields for selection..when i press enter after entering some values,based on that my table control will get filled up..and when i double -click on that row in table control i get all the values of that row in the respective fields in my tabstrip..all these r in same screen 100..and in tabstrip i have 5 tabs with 5 subscreens..containing the fields of table control..now that when i enter a value in the selection screen fields..my table control is getting added with a second row of values as required..but my problem is that the values of the tabstrip should get cleared..this is not happening..i wrote logic like if my tablecontrol is getting appended the values from tabstrip should get cleared..all the fields are getting cleared except the fields of tab which is active..how to do it..Hi,
Try this out.
declare a variable in Top Include
data : appended type c.
if the appending to the internal table is success means sy-subrc = 0
make appended = 'X'.
go to the PBO of subscreen of the tab where you want to clear the data
if appended = 'X'.
clear appended.( this is must otherwise for every call of the subscreen of this tab the values get cleared)
here clear the value of the subscreen of the tab strip)
endif.
The same can be achieved using the OK_CODE also
Regards
Ramchander Rao.K -
Header and item details on same screen in form of two reports
Hello,
I would like to print in a same screen two ALV grid with different command for each.
The two grid will be linked.
One is the header of the datas and the second represent the items of the selected data in the the header grid.
example user will get all sales order details and when user click on any sales order than on the same screen below i get the item data of that sales order...
how can i do that
Do you have any example for me, please ?
Thanks in advance for help,
Best regards,
TaranHi
use ALV hierarchial display function module for this.
see the sample code for this
REPORT zwmr_pick_status_report NO STANDARD PAGE HEADING
MESSAGE-ID zw.
Type Pools
TYPE-POOLS: icon, slis.
Tables
TABLES: tvst,
likp,
t30b,
vekp,
*{ INSERT UKMK900355 4
zhu_to_link, "AS03
*} INSERT
zpallettr,
vttk, "MB01
zvantr.
Types
TYPES:
BEGIN OF ty_data,
lgtor LIKE likp-lgtor, " door
vbeln LIKE likp-vbeln, " delivery
wbstk LIKE vbuk-wbstk, " Goods movement status
kostk LIKE vbuk-kostk, " Picking status
posnr LIKE lips-posnr, " item
route LIKE likp-route, " route
wadat LIKE likp-wadat, " goods issue date
lvsta LIKE vbup-lvsta, " warehouse status
packvorschr LIKE vekp-packvorschr, " pack mnemonic
exidv LIKE vekp-exidv, " handling unit
zpallet_no(10), "like zpallettr-zpallet_no, " pallet no
zdep_point LIKE zpallettr-zdep_point, "Departur Point "Jvdm01
zcount_check LIKE zpallettr-zcount_check," count check flag
zvan_no(10), "like zvantr-zvan_no, " van no
zvan_print LIKE zvantr-zvan_print, " van manifest print
tknum LIKE vttk-tknum, " Shipment No "ANV 11523
zeod_print LIKE zvantr-zeod_print, " eod manifest print
zzpackclass LIKE vekp-zzpackclass, " package class
zzti LIKE vekp-zzti, " T.I. value
vstel LIKE likp-vstel, "Shipping point RM050906
anzpk TYPE znopack, "No of packages in dlv MB01+
END OF ty_data.
TYPES:BEGIN OF x_likp ,
vbeln LIKE likp-vbeln,
vstel LIKE likp-vstel, "RM050906
lgtor LIKE likp-lgtor,
zzroute2lgtor LIKE likp-zzroute2lgtor, "MB01
route LIKE likp-route,
wadat LIKE likp-wadat,
zz2route LIKE likp-zz2route, "MB01+
zzexproute LIKE likp-zzexproute, "MB01+
zzroute2 LIKE likp-zzroute2, "MB01+
anzpk LIKE likp-anzpk,
END OF x_likp.
TYPES: BEGIN OF x_vbuk,
vbeln TYPE vbuk-vbeln,
wbstk TYPE vbuk-wbstk, " Goods movement status
kostk TYPE vbuk-kostk, " Picking status
END OF x_vbuk.
TYPES: BEGIN OF x_lips,
vbeln TYPE lips-vbeln, " delivery
posnr TYPE lips-posnr, " item
pstyv TYPE lips-pstyv,
matnr TYPE lips-matnr,
charg TYPE lips-charg,
END OF x_lips.
TYPES: BEGIN OF x_vbup,
vbeln TYPE vbup-vbeln, " delivery
posnr TYPE vbup-posnr, " item
lvsta TYPE vbup-lvsta, " warehouse status
END OF x_vbup.
TYPES: BEGIN OF x_vepo,
venum TYPE vepo-venum, "Internal Handling Unit
Number
vepos TYPE vepo-vepos, "Handling Unit Item
vbeln TYPE vepo-vbeln, " delivery
posnr TYPE vepo-posnr, " item
exidv TYPE vekp-exidv,
END OF x_vepo.
TYPES: BEGIN OF x_vepo1,
venum TYPE vekp-venum, "Internal Handling Unit
Number
exidv TYPE vekp-exidv,
END OF x_vepo1.
Start of changes by ANV SR#11523
TYPES: BEGIN OF x_vttp,
tknum TYPE tknum, " Shipment No
tpnum TYPE tpnum, " Item No
vbeln TYPE vbup-vbeln, " delivery
laufk LIKE vttk-laufk, " leg indicator MB01+
END OF x_vttp.
End of changes by ANV SR#11523
Data
RANGES: r_del FOR likp-vbeln,
r_lgtor FOR likp-lgtor.
RANGES: r_vanno FOR zvantr-zvan_no,
r_palno FOR zpallettr-zpallet_no.
DATA: BEGIN OF number_range OCCURS 0,
mark(1),
id(3),
num(10) TYPE n,
desc LIKE zpalletmd-zdesc,
END OF number_range.
DATA: t_disp_tab TYPE STANDARD TABLE OF zpickdisp,
t_data_tab TYPE ty_data OCCURS 0 WITH HEADER LINE,
it_likp TYPE x_likp OCCURS 0 WITH HEADER LINE, "SUM
it_vbuk TYPE x_vbuk OCCURS 0 WITH HEADER LINE, "SUM
it_lips TYPE x_lips OCCURS 0 WITH HEADER LINE, "SUM
it_vbup TYPE x_vbup OCCURS 0 WITH HEADER LINE, "SUM
it_vepo TYPE x_vepo OCCURS 0 WITH HEADER LINE, "SUM
it_vepo2 TYPE x_vepo OCCURS 0 WITH HEADER LINE, "SUM
*{ INSERT UKMK900355 3
t_vepo_low TYPE x_vepo OCCURS 0 WITH HEADER LINE, " AS01
*} INSERT
it_vepo1 TYPE x_vepo1 OCCURS 0 WITH HEADER LINE, "SUM
it_vttp TYPE x_vttp OCCURS 0 WITH HEADER LINE, "ANV SR#11523
t_disp_head TYPE STANDARD TABLE OF zpickhead.
DATA wa_item_tab TYPE zpickdisp OCCURS 0 WITH HEADER LINE.
"ANV SR#11113
DATA: w_numrnge LIKE number_range,
w_number(10) TYPE n.
DATA: t_likp LIKE likp OCCURS 0 WITH HEADER LINE,
t_lips LIKE lips OCCURS 0 WITH HEADER LINE,
t_vbuk LIKE vbuk OCCURS 0 WITH HEADER LINE,
t_vbup LIKE vbup OCCURS 0 WITH HEADER LINE,
t_vepo LIKE vepo OCCURS 0 WITH HEADER LINE,
t_vekp LIKE vekp OCCURS 0 WITH HEADER LINE,
t_vantr LIKE zvantr OCCURS 0 WITH HEADER LINE,
t_pallettr LIKE zpallettr OCCURS 0 WITH HEADER LINE,
w_likp like likp,
w_lips LIKE lips,
w_vbuk LIKE vbuk,
w_vbup LIKE vbup,
w_vepo LIKE vepo,
w_vekp LIKE vekp,
w_vepo TYPE x_vepo1,
w_vbup TYPE x_vbup,
w_vttp TYPE x_vttp, " ANV SR#11523
w_lips TYPE x_lips,
w_vbuk TYPE x_vbuk,
w_likp TYPE x_likp, "MB01-+
w_tplst LIKE vttk-tplst. "MB01+
DATA: s_variant LIKE disvariant, "MB01+
def_variant LIKE disvariant.
ALV DATA *****
DATA:
g_grid TYPE REF TO cl_gui_alv_grid,
g_sort TYPE slis_t_sortinfo_alv,
g_custom_container TYPE REF TO cl_gui_custom_container,
g_layout TYPE slis_layout_alv,
gt_fieldcat TYPE slis_t_fieldcat_alv,
t_fldcat LIKE LINE OF gt_fieldcat,
g_keyinfo TYPE slis_keyinfo_alv,
gt_events TYPE slis_t_event,
gs_event TYPE slis_alv_event,
w_sy_repid LIKE sy-repid.
DATA: BEGIN OF seltab OCCURS 0.
INCLUDE STRUCTURE rsparams.
DATA: END OF seltab.
SYSTEM GENERATED TABLE CONTROL DATA ********
DECLARATION OF TABLECONTROL 'TC_TABCON' ITSELF
CONTROLS: tc_tabcon TYPE TABLEVIEW USING SCREEN 0100.
LINES OF TABLECONTROL 'TC_TABCON'
DATA: g_tc_tabcon_lines LIKE sy-loopc.
DATA: ok_code LIKE sy-ucomm.
Constants
CONSTANTS: c_data_class LIKE klah-class VALUE 'DG_DATA',
c_mat_class LIKE rmclf-klart VALUE '001',
c_pack LIKE lips-mtart VALUE 'VERP',
c_a(1) VALUE 'A',
c_b(1) VALUE 'B',
c_c(1) VALUE 'C',
c_yes(1) VALUE 'X',
c_no(1) VALUE ' '.
Selection screen
standard report select options block
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-002.
SELECT-OPTIONS:
s_wadat FOR likp-wadat NO-EXTENSION OBLIGATORY. " Goods Issue Date
*parameters: "TR01-
p_vstel like tvst-vstel obligatory. " Shipping Point "TR01-
SELECT-OPTIONS: "TR01+
p_vstel FOR tvst-vstel. " Shipping Point "TR01+
SELECT-OPTIONS:
s_lfart FOR likp-lfart, " Delivery type
s_lgtor FOR t30b-lgtor, " Door selection
s_exidv FOR vekp-exidv, " Handling Unit
s_vbeln FOR likp-vbeln, " Delivery "MB01-+
s_lfdat FOR likp-lfdat. " Delivery date
PARAMETERS:
p_exdata AS CHECKBOX. " Show extra columns flag
SELECTION-SCREEN END OF BLOCK a.
van/pallet specific select options block
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
SELECT-OPTIONS:
s_palno FOR zpallettr-zpallet_no, " no-extension,
s_vanno FOR zvantr-zvan_no. " no-extension.
SELECT-OPTIONS:
s_deppnt FOR zpallettr-zdep_point, "Jvdm01
s_tplst FOR vttk-tplst. "MB01
SELECTION-SCREEN END OF BLOCK b.
MB01 - START - Display variant
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-019.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK c.
MB01 - END
Value Request Events
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-low.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_pal_nos.
s_palno-low = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-high.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_pal_nos.
s_palno-high = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-low.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_van_nos.
s_vanno-low = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-high.
CLEAR: number_range, w_number .
REFRESH number_range.
select numbers and display pop up screen for selection
PERFORM select_van_nos.
s_vanno-high = w_number.
MB01 - START - display variant
F4-Help for variant
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
MB01 - END
At Selection Screen
AT SELECTION-SCREEN.
PERFORM validate_selections.
Initialization
INITIALIZATION.
MB01 - START INSERT
1. Transportation planning point
Import transportation planning point from user parameters and
populate
select option.
GET PARAMETER ID 'TDP' FIELD w_tplst.
MOVE: 'I' TO s_tplst-sign,
'EQ' TO s_tplst-option,
w_tplst TO s_tplst-low.
APPEND s_tplst.
2. Display variant
CLEAR s_variant.
s_variant-report = sy-repid.
Get default variant
s_def_variante = s_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = s_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = s_variant-variant.
ENDIF.
MB01 - END INSERT
Start of selection
START-OF-SELECTION.
clear all data tables
CLEAR: t_likp,
it_likp,
t_lips,
t_vbuk,
t_vbup,
t_vepo,
t_vantr,
t_pallettr,
w_likp,
w_lips,
w_vbuk,
w_vbup,
w_vepo,
w_vekp.
REFRESH: t_likp,
it_likp,
t_lips,
t_vbuk,
t_vbup,
t_vepo,
t_vantr,
t_pallettr.
select data for ALV
due to different input parameters being used, to streamline the data
selection process, different selection methods are required
IF NOT s_vanno IS INITIAL
OR NOT s_palno IS INITIAL
OR NOT s_deppnt IS INITIAL. "Jvdm01
if selecting by van/pallet number, need to select the data from the
handling unit upwards to delivery
PERFORM select_data_up.
ELSE.
otherwise the data can be selected from the delivery downwards
PERFORM select_data_down.
ENDIF.
End of selection
END-OF-SELECTION.
call hierarchical ALV display function module
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZWMR_PICK_STATUS_REPORT'
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command =
'USER_COMMAND' "custom gui status form
is_layout = g_layout "user command form
it_fieldcat = gt_fieldcat
it_sort = g_sort
i_save = 'X' "MB01+
is_variant = s_variant
it_events = gt_events
i_tabname_header = 't_disp_head'
i_tabname_item = 't_disp_tab'
i_structure_name_header = 'ZPICKHEAD'
i_structure_name_item = 'ZPICKDISP'
is_keyinfo = g_keyinfo
TABLES
t_outtab_header = t_disp_head
t_outtab_item = t_disp_tab.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
FORMS
Includes inserted by Screen Painter Wizard. DO NOT CHANGE THIS LINE!
INCLUDE zwmr_pick_o01.
INCLUDE zwmr_pick_status_reporto01 .
INCLUDE zwmr_pick_i01.
INCLUDE zwmr_pick_status_reporti01 .
INCLUDE zwmr_pick_f01.
INCLUDE zwmr_pick_status_reportf01 .
*& Form select_pal_nos
select pallet numbers for search help
FORM select_pal_nos.
DATA: BEGIN OF t_palno OCCURS 0,
zpallet_no LIKE zpallettr-zpallet_no,
END OF t_palno.
select all available pallet numbers
SELECT DISTINCT zpallet_no FROM zpallettr
INTO CORRESPONDING FIELDS OF TABLE t_palno.
LOOP AT t_palno.
get pallet id
SELECT SINGLE zpallet_id FROM zpallettr
INTO number_range-id
WHERE zpallet_no = t_palno-zpallet_no.
get pallet description
SELECT SINGLE zdesc FROM zpalletmd
INTO number_range-desc
WHERE zpallet_id = number_range-id.
number_range-num = t_palno-zpallet_no.
append to search help table
APPEND number_range.
ENDLOOP.
call pop up dialog box
CALL SCREEN 0100 STARTING AT 5 5.
ENDFORM. " select_pal_nos
*& Form select_van_nos
select van numbers for search help
FORM select_van_nos.
DATA: BEGIN OF t_vanno OCCURS 0,
zvan_no LIKE zvantr-zvan_no,
END OF t_vanno.
select available van numbers
SELECT DISTINCT zvan_no FROM zvantr
INTO CORRESPONDING FIELDS OF TABLE t_vanno.
LOOP AT t_vanno.
select van id
SELECT SINGLE zvan_id FROM zvantr
INTO number_range-id
WHERE zvan_no = t_vanno-zvan_no.
select van description (maintained in pallet tables)
SELECT SINGLE zdesc FROM zpalletmd
INTO number_range-desc
WHERE zpallet_id = number_range-id.
number_range-num = t_vanno-zvan_no.
append to search help table
APPEND number_range.
ENDLOOP.
call pop up dialog box
CALL SCREEN 0100 STARTING AT 5 5.
ENDFORM. " select_van_nos
*& Form select_data_down
select data if selecting from delivery down
FORM select_data_down.
select all deliveries from LIKP that fulfill selection criteria
Start SU01 optmization changes
SELECT vbeln vstel lgtor route wadat "RM050906
SELECT vbeln vstel lgtor route wadat
zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp"MB01-+
WHERE vbeln IN s_vbeln
AND vstel IN p_vstel
AND lfart IN s_lfart
AND wadat IN s_wadat
AND lfdat IN s_lfdat "MB01+
AND
( lgtor IN s_lgtor OR zzroute2lgtor IN s_lgtor ) ."MB01+
IF sy-subrc NE 0.
no data found
MESSAGE i007.
EXIT.
ENDIF.
IF NOT t_likp[] IS INITIAL. "SUM
IF NOT it_likp[] IS INITIAL.
SORT it_likp BY vbeln. "SUM
select sales document headers from VBUK
SELECT vbeln wbstk kostk
FROM vbuk INTO TABLE it_vbuk
FOR ALL ENTRIES IN it_likp "SUM
WHERE vbeln EQ it_likp-vbeln. "SUM
SORT it_vbuk BY vbeln.
select all relevant delivery items from LIPS
SELECT vbeln posnr pstyv matnr charg
FROM lips INTO TABLE it_lips
FOR ALL ENTRIES IN it_likp
WHERE vbeln EQ it_likp-vbeln
AND pckpf NE 'B' "cannot be packed "AS05
AND pstyv NE 'ZPAC' "AS05
AND pstyv NE 'ZGDP' "TR02+ "AS05
AND lfimg GT 0. "TR01+
ENDIF.
IF NOT it_lips[] IS INITIAL.
select all sales document line items from VBUP
SORT it_lips BY vbeln posnr. "SUM
SELECT vbeln posnr lvsta
FROM vbup INTO TABLE it_vbup
FOR ALL ENTRIES IN it_lips
WHERE vbeln EQ it_lips-vbeln
AND posnr = it_lips-posnr.
SORT it_vbup BY vbeln posnr.
select corresponding handling unit ID's (venum)
TR03 Replace
start
select * from vepo appending corresponding fields of table t_vepo
for all entries in t_lips
where vbeln = t_lips-vbeln
and posnr = t_lips-posnr
and matnr = t_lips-matnr
and charg = t_lips-charg.
SELECT vepoVENUM vepoVEPOS vepovbeln vepoposnr
FROM vepo as vepo
INNER JOIN vekp as vekp ON vepovenum = vekpvenum
APPENDING corresponding fields of table it_vepo
FOR ALL ENTRIES IN it_lips
WHERE vepo~vbeln = it_lips-vbeln
AND vepo~posnr = it_lips-posnr
AND vepo~matnr = it_lips-matnr
AND vepo~charg = it_lips-charg
AND vekp~exidv IN s_exidv.
SELECT venum vepos vbeln posnr
FROM vepo INTO TABLE it_vepo2
FOR ALL ENTRIES IN it_lips
WHERE vbeln = it_lips-vbeln
AND posnr = it_lips-posnr
AND matnr = it_lips-matnr
AND charg = it_lips-charg.
SORT it_vepo2 BY venum vepos.
*{ INSERT UKMK900355 1
Ice-multis: replace lower-level HUs with highest level " AS01
PERFORM replace_highest_hu. " AS01
*} INSERT
Start of changes by ANV SR#11523
MB01 - extract shipment header as well to populate leg indicator
Therefore, join vttp with vttk
Limit as well by transportation planning point
SELECT vttptknum vttptpnum vttpvbeln vttklaufk
FROM vttp INNER JOIN vttk
ON vttptknum = vttktknum
INTO TABLE it_vttp
FOR ALL ENTRIES IN it_lips
WHERE vttp~vbeln = it_lips-vbeln
AND vttk~tplst IN s_tplst.
MB01 - END
End of changes by ANV SR#11523
IF NOT it_vepo2[] IS INITIAL.
SELECT venum exidv
FROM vekp INTO TABLE it_vepo1
FOR ALL ENTRIES IN it_vepo2
WHERE venum = it_vepo2-venum
AND exidv IN s_exidv.
ENDIF.
SORT it_vepo1 BY venum.
CLEAR: w_vepo, it_vepo.
LOOP AT it_vepo1.
READ TABLE it_vepo2 WITH KEY venum = it_vepo1-venum.
IF sy-subrc = 0.
it_vepo2-exidv = it_vepo1-exidv.
MODIFY it_vepo2 TRANSPORTING exidv
WHERE venum = it_vepo1-venum .
ENDIF.
ENDLOOP.
DELETE it_vepo2 WHERE exidv IS initial.
it_vepo[] = it_vepo2[].
TR03 Replace end
ENDIF.
build process table
PERFORM move_to_table.
ENDFORM. "select_data_down
*& Form select_data_up
select data if selecting from van/pallet up
FORM select_data_up.
IF NOT s_vanno IS INITIAL.
if van then select van numbers and hence pallet numbers
SELECT * FROM zvantr INTO TABLE t_vantr
WHERE zvan_no IN s_vanno.
and vstel eq p_vstel."TR01-
IF NOT t_vantr[] IS INITIAL.
SORT t_vantr BY zvan_id zvan_no vstel zpallet_no. "SUM
SELECT * FROM zpallettr INTO TABLE t_pallettr
FOR ALL ENTRIES IN t_vantr
WHERE zpallet_no EQ t_vantr-zpallet_no
AND zdep_point IN s_deppnt. "Jvdm01
and vstel eq p_vstel."TR01-
ENDIF.
ELSE.
otherwise can get pallet numbers directly
SELECT * FROM zpallettr INTO TABLE t_pallettr
WHERE zpallet_no IN s_palno
AND zdep_point IN s_deppnt. "Jvdm01
and vstel eq p_vstel."TR01-
ENDIF.
IF NOT t_pallettr[] IS INITIAL.
from the pallet nos. we can select the handling units
SORT t_pallettr BY zpallet_id zpallet_no vstel exidv. "SUM
SELECT * FROM vekp INTO TABLE t_vekp
FOR ALL ENTRIES IN t_pallettr
WHERE exidv EQ t_pallettr-exidv
AND exidv NE space
AND exidv IN s_exidv "TR03+
AND ( exida = 'E' "TR01+
OR exida = 'F' ). "TR01+
ENDIF.
SORT t_vekp BY venum. "SUM
IF NOT t_vekp[] IS INITIAL.
build vbeln range from t_vekp.
LOOP AT t_vekp.
r_del-sign = 'I'.
r_del-option = 'EQ'.
r_del-low = t_vekp-vpobjkey.
APPEND r_del.
ENDLOOP.
select all deliveries from LIKP that correspond to HU's
SELECT * FROM likp INTO TABLE t_likp
WHERE vbeln IN r_del
AND wadat IN s_wadat
AND lfart IN s_lfart.
ENDIF.
MB01- START
SELECT vbeln lgtor route wadat
FROM likp INTO TABLE it_likp
WHERE vbeln IN r_del
AND wadat IN s_wadat
AND lfart IN s_lfart.
SELECT vbeln vstel lgtor route wadat
zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp
WHERE vbeln IN r_del
AND lfart IN s_lfart
AND wadat IN s_wadat "MB01-+
AND lfdat IN s_lfdat. "MB01+
MB01- END
ENDIF.
IF NOT it_likp[] IS INITIAL.
SORT it_likp BY vbeln . "SUM
select sales document headers from VBUK
SELECT * FROM vbuk INTO TABLE t_vbuk
FOR ALL ENTRIES IN t_likp
WHERE vbeln EQ t_likp-vbeln.
SELECT vbeln wbstk kostk
FROM vbuk INTO TABLE it_vbuk
FOR ALL ENTRIES IN it_likp
WHERE vbeln EQ it_likp-vbeln.
SORT it_vbuk BY vbeln. "SUM
select all relevant delivery items from LIPS
SELECT * FROM lips INTO TABLE t_lips
FOR ALL ENTRIES IN t_likp
WHERE vbeln EQ t_likp-vbeln
AND pstyv NE 'ZPAC'
AND pstyv NE 'ZGDP' "TR02+
AND lfimg GT 0. "TR01+
SELECT vbeln posnr pstyv matnr charg
FROM lips INTO TABLE it_lips
FOR ALL ENTRIES IN it_likp
WHERE vbeln EQ it_likp-vbeln
AND pckpf NE 'B' "cannot be packed "AS05
AND pstyv NE 'ZPAC' "AS05
AND pstyv NE 'ZGDP' "TR02+ "AS05
AND lfimg GT 0. "TR01+
ENDIF.
IF NOT it_lips[] IS INITIAL.
SORT it_lips BY vbeln posnr. "SUM
select all sales document line items from VBUP
SELECT * FROM vbup INTO TABLE t_vbup
FOR ALL ENTRIES IN t_lips
WHERE vbeln EQ t_lips-vbeln
AND posnr = t_lips-posnr.
Start of changes by ANV SR#11523
MB01 - START
join vttp with vttk to obtain leg indicator
SELECT tknum tpnum vbeln
FROM vttp INTO TABLE it_vttp
FOR ALL ENTRIES IN it_lips
WHERE vbeln = it_lips-vbeln.
SELECT vttptknum vttptpnum vttpvbeln vttklaufk
FROM vttp INNER JOIN vttk
ON vttptknum = vttktknum
INTO TABLE it_vttp
FOR ALL ENTRIES IN it_lips
WHERE vttp~vbeln = it_lips-vbeln
AND vttk~tplst IN s_tplst.
MB01 - END
End of changes by ANV SR#11523
SELECT vbeln posnr lvsta
FROM vbup INTO TABLE it_vbup
FOR ALL ENTRIES IN it_lips
WHERE vbeln EQ it_lips-vbeln
AND posnr = it_lips-posnr.
SORT t_vbup BY vbeln posnr. "SUM
select corresponding handling unit ID's (venum)
SELECT * FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE t_vepo
FOR ALL ENTRIES IN t_lips
WHERE vbeln = t_lips-vbeln
AND posnr = t_lips-posnr
AND matnr = t_lips-matnr
AND charg = t_lips-charg.
SELECT venum vepos vbeln posnr
FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE it_vepo
FOR ALL ENTRIES IN it_lips
WHERE vbeln = it_lips-vbeln
AND posnr = it_lips-posnr
AND matnr = it_lips-matnr
AND charg = it_lips-charg.
*{ INSERT UKMK900355 1
it_vepo2[] = it_vepo[]. " DS01
PERFORM replace_highest_hu. " DS01
it_vepo[] = it_vepo2[]. " DS01
*} INSERT
ENDIF.
build process table
PERFORM move_to_table.
ENDFORM. "select_data_up
*& Form move_to_table
move data to processing table
FORM move_to_table.
LOOP AT it_vepo.
CLEAR t_data_tab.
delivery lines.
CLEAR w_lips.
READ TABLE it_lips WITH KEY vbeln = it_vepo-vbeln
posnr = it_vepo-posnr
INTO w_lips BINARY SEARCH. "SUM
MOVE-CORRESPONDING w_lips TO t_data_tab.
sales document line items
CLEAR w_vbup.
READ TABLE it_vbup WITH KEY vbeln = it_vepo-vbeln
posnr = it_vepo-posnr
INTO w_vbup BINARY SEARCH. "SUM
if w_vbup-kosta = space. "TR01-
not relevant for picking
delete t_vepo. "TR01-
continue. "TR01-
else. "TR01-
MOVE-CORRESPONDING w_vbup TO t_data_tab.
endif. "TR01-
sales doc header
CLEAR w_vbuk.
READ TABLE it_vbuk WITH KEY vbeln = it_vepo-vbeln
INTO w_vbuk BINARY SEARCH. "SUM
MOVE-CORRESPONDING w_vbuk TO t_data_tab.
delivery header
CLEAR w_likp.
READ TABLE it_likp WITH KEY vbeln = it_vepo-vbeln
INTO w_likp BINARY SEARCH. "SUM
MOVE-CORRESPONDING w_likp TO t_data_tab.
MB01 - START
DATA: w_routetype TYPE i. "0=non-global,1=1st route,2=2nd
route,3=both
At this point move DOOR2 if it falls within the global route scenario
and the door2 is satisfies the selection criteria for door
1. Does delivery fall within global route scenario
CLEAR w_routetype.
IF w_likp-zz2route = 'Y' .
1.a. First route - does door1 satisfy the selection criteria
IF w_likp-lgtor IN s_lgtor.
w_routetype = 1.
MOVE w_likp-zzexproute TO t_data_tab-route.
1.b. Second route - does door2 satisfy the selection criteria
ELSEIF w_likp-zzroute2lgtor IN s_lgtor.
here we need to move door2 to lgtor
w_routetype = 2.
MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
MOVE w_likp-zzroute2 TO t_data_tab-route.
ENDIF.
If both routes satsify the criteria, append for 2nd leg ***REVISIT!
IF w_likp-lgtor IN s_lgtor AND w_likp-zzroute2lgtor IN s_lgtor.
w_routetype = 3.
ENDIF.
ENDIF.
MB01 - END
Start of changes by ANV SR#11523
MB01 - If the delivery falls within the global route scenario... need
to select either preliminary shipment leg OR subsequent leg
when laufk= 1 (prelim) and linked to route1, if laufk = 2 (subseq) &
linked to route2
Shipment Number
SORT it_vttp BY vbeln laufk.
CLEAR w_vttp.
CASE w_routetype.
WHEN 0.
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
INTO w_vttp BINARY SEARCH.
WHEN 1.
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
laufk = '1'
INTO w_vttp BINARY SEARCH.
WHEN 2.
READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
laufk = '3'
INTO w_vttp BINARY SEARCH.
WHEN 3. "REVISIT
ENDCASE.
MOVE w_vttp-tknum TO t_data_tab-tknum.
MB01 - END
End of changes by ANV SR#11523
select handling unit info using vepo entry
CLEAR w_vekp.
IF t_vekp[] IS INITIAL.
SELECT SINGLE * FROM vekp INTO w_vekp
WHERE venum = it_vepo-venum.
ELSE.
READ TABLE t_vekp WITH KEY venum = it_vepo-venum
INTO w_vekp BINARY SEARCH. "SUM
IF sy-subrc NE 0.
SELECT SINGLE * FROM vekp INTO w_vekp
WHERE venum = t_vepo-venum.
ENDIF.
ENDIF.
MOVE-CORRESPONDING w_vekp TO t_data_tab.
*{ INSERT UKMK900355 2
WM status for HU "AS03
SELECT SINGLE * FROM zhu_to_link WHERE lgnum EQ w_vekp-lgnum"AS03
AND exidv EQ w_vekp-exidv."AS03
IF sy-subrc EQ 0. "AS03
IF zhu_to_link-zpick_comp EQ space. "AS03
t_data_tab-lvsta = 'B'. "AS03
ELSE. "AS03
t_data_tab-lvsta = 'C'. "AS03
ENDIF. "AS03
ENDIF. "AS03
*} INSERT
select pallet / van load information "Jvdm01-
SELECT SINGLE zpallet_no zcount_check FROM zpallettr "Jvdm01-
INTO (t_data_tab-zpallet_no, "Jvdm01-
t_data_tab-zcount_check) "Jvdm01-
WHERE exidv EQ w_vekp-exidv. "Jvdm01-
PERFORM read_pallet. "MB01+
SELECT SINGLE zpallet_no zcount_check zdep_point "Jvdm01+
FROM zpallettr "Jvdm01+
INTO (t_data_tab-zpallet_no, "Jvdm01+
t_data_tab-zcount_check, "Jvdm01+
t_data_tab-zdep_point) "Jvdm01+
Maybe you are looking for
-
How to make a report based on the result of another report?
Hi, All, I am a new guy in BW development I made the report1, to show the "Total Sales in each country and each shop " (the fact table is "Order") now I want to make report2 "in each countries, the number of the shops, whose Total Sales >100000" Can
-
Trying to download iTunes on my husband' s windows vista laptop. Have tried 2 different browsers and it almost finishes the download process and we get error messages that say "error z, apple application was not found, windows error 2" Can you help?
-
Hyper-v manager no new option - unable to create new/a vm
Hello, I have a leptop HP 450 , with Windows 8.1 pro . I am trying to create a virtual machine but I can not do it. In Hyper-v manager I don't have the "new" option. I have Only "connect to a server" . My leptop is for home use. Thanks,
-
We are setting up Clustering for WL6.1 with a Admin Server and a Managed Server on different machines. All beans are deployed on Managed Server. Everything looks fine and we can run applications too. But in console, we g
-
Interface trip stop -- Completed with Warining in inventory where do you
Hi Guru's While running concurrent program : Interface trip stop --> Completed with Warining in inventory where do you check this transaction. Please let me know the Navigation regds MRR