08-21-2007 1:38 PM
Hi Friends,
<b>Requirement </b>: Create a new transaction ZLX03 copying LX03. The requirement is to add an extra field to the alv display.
Transaction : LX03. Give in the Warehouse number and the Storage Type and execute. We get an alv display. Press CTRL+F8. I need to have MBEW-STPRS as a field for selection based on MATNR and BWKEY. Presently all other data is being read from table LQUA.
Work Done : Copied standard program RLS10030(not sure if it is the right program) to a Z program and am trying to make changes there. Am I taking the right approach? Is there any easier method?
If I am taking the right approach, what changes should be done to achieve this result?
Thanks and Regards
Aneesh.
08-21-2007 2:20 PM
Hi!
You are doing it correctly.
After the copy, it is just a regular ALV list.
Just add your field to the internal table, add it to the ALG, and fill it with data during the program run.
Don't forget to translate it is it is needed.
Regards
Tamá
08-21-2007 2:44 PM
Tamas,
I started working on it and will and am almost done, except that i dont have access to test it out yet, waiting on my basis team.
Regards
Aneesh.
08-21-2007 2:53 PM
Aneesh,
For SAP for standard reports, it will provide some userexits.
First you can search for userexit and try to add your field in that userexit.
There are lots of userexit available for LX03 t.code.
Goto t.code SMOD ---> Utilites ---> Find
Enter Package as LVS and execute.
You will all the userexit for LX03.
Ali.
08-21-2007 3:29 PM
Hi Everyone,
Everything is working fine. I am able to display the field MBEW-STPRS and also a field NETWR. Now the problem is since MBEW_STPRS is a standard field, the label is showed automatically in the ALV. But since NETWR is a field that I have calculated, there is no label for that field in the alv list, although the values are coming out right.
I tried changing the test elements and assigning a text element to this field, but tht's not working.
Anyone has any idea?
Thanks
Aneesh.
08-21-2007 9:12 PM
Why don't fill fieldcatlog manually ,i guess it should be before ALV FM..
Thanks
Seshu
08-21-2007 9:57 PM
Seshu,
This is what I am doing.
CLEAR afield.
afield-fieldname = 'NETWR'.
afield-ref_tabname = 'MBEW'.
afield-seltext_s = text-003.
afield-seltext_m = text-003.
afield-seltext_l = text-003.
afield-outputlen = 14.
APPEND afield to xfield.
and in the text elements declaring that 003 to be extended price. But its never coming up. Is there a way that I can just hard-code it to be "Extended Price".
Thanks
Aneesh.
08-21-2007 10:05 PM
Aneesh,
If you use fieldcatlog ref field and ref table ,then it will get text from sap table and not from program.
better to create one structure ,maintain your field there ,give proper description in data element.
now use that structure here.
assume that ur structure is ZMBEW
CLEAR afield.
afield-fieldname = 'ZNETWR'.
afield-ref_tabname = 'ZMBEW'.
afield-seltext_s = text-003.
afield-seltext_m = text-003.
afield-seltext_l = text-003.
afield-outputlen = 14.
APPEND afield to xfield.
or
or do not use ref_tabname and see the results
Thanks
Seshu
08-21-2007 10:15 PM
Seshu,
Since it is only for one field, I dont want to create a structure. Is there a way instead of using the fieldname and tab name. I just used those because I also added another field which was in a table and it worked.
Thanks
Aneesh.
08-22-2007 1:56 PM
Sloved it.
Instead of using field catalog, I used MBEW-SALK3.
Thanks Everyone.
Aneesh.
09-06-2007 1:51 PM
It's that a WMS transction code? I'm looking for an SD trans code.