08-21-2011 9:51 AM
Dear Experts
I have a selection screen parameter named 'Project Name'. I need to display the list of project in the help.
But the issue i am facing is that my project names are stored in 2 different tables.
table 1 : PROJ which is through WBS element.
table 2 : a Custom field is created in VBAK which stores the project names if it is based on a sales order.
Is it possible to display the project names from both those tables in the F4 Help at selection screen.
Thanks in advance.
Zamir Parkar
08-21-2011 10:28 AM
Hi,
if these 2 fields are both the same length/definition, then you may assign (PARAMETER ... MATCHCODE ID ...) a collective search help (I think it's the cleanest solution) in which there are both a standard project search help, and the other one will be a new custom search help on VBAK-ZZ... field.
Otherwise, you'll have to handle it manually, using the POV (AT SELECTION-SCREEN ON VALUE-REQUEST FOR, and inside, you'll code whatever you want)
BR
Sandra
08-21-2011 12:21 PM
08-24-2011 7:09 AM
Hi Chinmay and Sandra Rossi
Tried your method. But it only displays the list for records that are available for the WBS element and not the custom field in vbak table.
Regards
Zamir Parkar
08-21-2011 3:37 PM
Hello Zamir,
But the issue i am facing is that my project names are stored in 2 different tables.
table 1 : PROJ which is through WBS element.
table 2 : a Custom field is created in VBAK which stores the project names if it is based on a sales order.
In order to maintain the data consistency w.r.t the project names, i'll suggest you maintain a check table for the custom field in VBAK. If you've done that, then you need not bother about this scenario.
If you've not maintained a check table against this custom field, i'll like to know why?
BR,
Suhas
08-22-2011 7:22 AM
Hello Suhas Saha
Actually the custom fields were created by the consultants who implemented SAP at our organization.
Regards
Zamir Parkar
08-22-2011 7:24 AM
Dear Sandra Rossi & chinmay kulkarni
Thanks for the suggestions will try it out and get back.
Regards
Zamir Parkar
08-24-2011 7:34 AM
- First create an elementary search help based on VBAK using your customer field. If the field length is not the same than PS_PSPID (24) use a search help exit to map the database field to an actual project name field (data element) (*) if the field has the same type/length just change the data element to PS_PSPID.
- Add this search help to project search help PRSM via Customizing (Project System, Structures, Operative Structures, Work Breakdown Structure (WBS), Matchcodes for Work Breakdown Structures (WBS), Matchcode for Project Definition)
- Use the search help PRSM in your report
Regards,
Raymond
(*) Create the search from VBAK, add a field PSPID (data element PS_PSPID) to parameters, create a FM for search help exit and in step callcontrol-step = 'DISP' use a F4UT_PARAMETER_VALUE_GET to get value of your customer field, and fill PSPID parameter via F4UT_PARAMETER_RESULTS_PUT
08-24-2011 10:16 AM
HI
In VBAP you have PS_PSP_PNR and in PROJ table you have PSPID
you use conversion exit (INPUT) function module and pass it to VBAP table to get the Sales orders against them
I observed VBAP is taking too long time so create an Index on PS_PSP_PNR field
If you want to display the WBS elements against the Sales orders then pass VBELN to VBAP table then you can fetch the WBS elements from it and no need to create the Index here
Hope this serve your purpose
Cheerz
Ramchander Rao.K
08-26-2011 6:44 AM
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_NUM.
REFRESH IT[].
SELECT f1 f2 f3 FROM <table> INTO TABLE IT.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'F1' " above select query field which is going to be displays values in the selection screen
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_NUM' " selection screen parameter
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
hope helpful..
regards,
anil
Edited by: anil.neegineni on Aug 26, 2011 7:45 AM