‎2007 Oct 02 9:39 AM
Hello Experts,
My selection screen's parameters is based on different tables like VBAK, LIKP, MARA and LIPS.
Now, How do I code my select statement since my selection screen is based from different tables?
I want to avoid using JOINS for this scenario.Anyway, below is my selection screen:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_audat FOR vbak-audat,
s_auart FOR vbak-auart,
s_bstnk FOR vbak-bstnk,
s_sold FOR vbak-kunnr,
s_ship FOR likp-kunnr,
s_spart FOR mara-spart,
s_matnr FOR vbap-matnr,
s_charg FOR lips-charg,
s_dlv FOR lips-vbeln,
s_lfdat FOR likp-lfdat.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: rb_local RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND cmd,
rb_ftp RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
PARAMETERS: p_fname2(60) TYPE c MODIF ID fnb,
p_fname TYPE rlgrap-filename DEFAULT 'c:' MODIF ID fna ,
p_ip(64) TYPE c LOWER CASE ,
p_user(30) TYPE c LOWER CASE ,
p_pword(30) TYPE c LOWER CASE .
SELECTION-SCREEN END OF BLOCK b4.
SELECTION-SCREEN END OF BLOCK b1.
Hope you can help me guys. Thank you and take care!
‎2007 Oct 02 9:56 AM
Hi
It is better to declare the Select -options with their Master data tables
where ever it is possible.
Kunnr from KNA1 instead of VBA-kunnr, Matnr from MARA instead of VBAP-MATNR, SPART from TSPA instead of MARA-SPART.
You can join the tables VBAk,VBAP,LIKP,LIPS,MARA and can give all the select -options in the where conditions
that is the efificient way I feel, since the tables Order and Delivery tables can easily be joined.
or first join VBAk,VBAP,MARA and give the VBELn,AUDAT,AUART,BSTNK, SPART from VBAK and then for all entries of this ITAB fetch LIKP and LIPS validating the LIKP-KUNNR,CHARG,VBELN,LFDAT in where condition.
Regards
Anji
‎2007 Oct 02 9:41 AM
'Now, How do I code my select statement since my selection screen is based from different tables?'
It depends on what you want to select...
‎2007 Oct 02 9:56 AM
Hi
It is better to declare the Select -options with their Master data tables
where ever it is possible.
Kunnr from KNA1 instead of VBA-kunnr, Matnr from MARA instead of VBAP-MATNR, SPART from TSPA instead of MARA-SPART.
You can join the tables VBAk,VBAP,LIKP,LIPS,MARA and can give all the select -options in the where conditions
that is the efificient way I feel, since the tables Order and Delivery tables can easily be joined.
or first join VBAk,VBAP,MARA and give the VBELn,AUDAT,AUART,BSTNK, SPART from VBAK and then for all entries of this ITAB fetch LIKP and LIPS validating the LIKP-KUNNR,CHARG,VBELN,LFDAT in where condition.
Regards
Anji
‎2007 Oct 02 10:10 AM
'It is better to declare the Select -options with their Master data tables
where ever it is possible.
Kunnr from KNA1 instead of VBA-kunnr, Matnr from MARA instead of VBAP-MATNR, SPART from TSPA instead of MARA-SPART.'
it does not matter, they are pointing to the same data element...