on 02-07-2013 6:41 AM
Hi,
Is there a way to add additional field in LX02 initial screen? Our client wants to include additional field for material.
Thanks,
Jojo
Step 1.
SE11: RL030_UNIQUE
append ZZFIELD.
Step 2.
SE38: RLS10020
Enhance form list_header.
LOOP AT lt_lagplqua ASSIGNING <fl>.
<fl>-ZZFIELD = 'test1'.
ENDLOOP.
Step 3.
SE38: RLS10020
Enhance form build_fieldcat.
clear afield.
afield-fieldname = 'ZZFIELD'.
afield-ref_tabname = 'RL030_UNIQUE'.
append afield to xfield.
Step 4.
Execute transaction /$SYNC if field is not shown in report.
* You can color conditionally.
* https://wiki.scn.sap.com/wiki/display/Snippets/Coloring+a+Row+in+an+ALV+conditionally
Step 1.
SE11: RL030_UNIQUE.
append ZZLINE_COLOR.
Step 2.
SE38: RLS10020
* In enhancement
layout-info_fieldname = 'ZZLINE_COLOR'.
if <fl>-ZZFIELD EQ 'condition'.
<fl>-zzline_color = 'C710'. "Light brown
else.
<fl>-zzline_color = 'C610'. "Light red
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jojo,
yes, you can use either use
1) a adapted copy of report RLS10020
2) a modification
3) implicit enhancements
3) is preferable, please check guides of ABAP workbench / enhancements like
http://wiki.sdn.sap.com/wiki/display/ABAP/How+To+Do+Implicit+Enhancement
But why you like to add additional query fields in selection screen ?
Are they Z* fields or SAP fields. LX02 has free selection options with icon
You can select any LAGP,LQUA,MARA,MAKT,MARC,MLGN field here. If they are Z* fields, check logical database definition of S1L and see if you can extend it by Z fields.
Best regards,
Matthias
BTW: LX02 is a ERP based SCM logistics transaction
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey matthew,
thanks for your reply.
so my dream to select directly via mara-matkl won`t be able ? 😕
i know, its possible to select matkl over f4-felp from matnr but while dealing with saved variants its a problem with new materials (i hope you understand what i mean)
i think i have to do a copy of lx02 -> ZLX02.
Hey Simon,
unfortunately, not directly. As you said, a one-time fixed materialnumber list by a F4 variant is not sufficient.
But SAP itself exteded the dynamic selection with a enhancement switch (stock segmenation functionality).
Iif your ERP EhP is new enough you'll find code like "IF cl_ops_switch_check=>sfsw_segmentation_02( ) EQ abap_on"
I would try to follow the same way as SAP did but with implicit enhancements.
The goal is:
1) The log.DB needs to provide MARA-MATKL selectable for user in LX02
2) the user input in the new field should be placed somehow in a WHERE clause on LQUA select.
As matkl is not a field of LQUA, the WHERE clause generated in report SAPDB1L, at begin of FORM put_lqua should be extended with a ... AND MATNR IN (...).
The (...) material number list (M1,M2,..) you can provide with an implicit enhancement e.g. by a SELECT matnr FROM MARA WHERE matkl = '...' (user input from dynamic selection)
Good luck,
Matthias
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.