cancel
Showing results for 
Search instead for 
Did you mean: 

Adding additional field in LX02 initial screen

Former Member
0 Kudos

Hi,

Is there a way to add additional field in LX02 initial screen? Our client wants to include additional field for material.

Thanks,

Jojo

Accepted Solutions (0)

Answers (2)

Answers (2)

Sergiu
Contributor
0 Kudos
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.
Former Member
0 Kudos

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

0 Kudos

Hi Matthias,

i`m not able to select mara, makt, Marc.

only lagp and lqua appears in free selection Options 😕

how can i add them?

thanks

Former Member
0 Kudos

Hi Simon,

you are right, it was little bit misleading in the previous post to name e.g. MARA itself (implies to be a own node in free selection).

Technically, the tables are bound already in S1L log.DB, the fields from MARA,MAKT are in LQUA node.

Best regards,

Matthias

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

i`ll try that! thanks in advice !