cancel
Showing results for 
Search instead for 
Did you mean: 

In sap personas 3.0 Can we create a custom search help linking values from function module FI_F4_ZTERM

surendra_battula
Participant

Good Day

I have a requirement as I have a custom field which is a zterm ( payment term ) on customer transaction. so it is  a search help field. but there is no

standard search help for zterm in knb1 table.  I have checked  in the standard transaction where the f4 help on the field  is linked to function module  FI_F4_ZTERM

I tested the function module and it gives a pop up with all values of payment terms and u can select the value from there.

is there a way i can do the same for this custom field.


I have created a field as f4 help in sap personas 3.0

I have a created a z function module as  rfc calling standard fm FI_F4_ZTERM

and I have done a scripting as below

var rfc=session.CreateRFC("ZFI_ZZTERM","");  ( calling rfc)

rfc.setParameter("I_KOART",'D');                      ( passing type as D)

rfc.requestResults(JSON.stringify(["ET_ZTERM"]));     (return the selected value from popup)

rfc.send();

var zterm=JSON.parse(rfc.getResults("Et_ZTERM"));

I think I am wrong in the sense as the function module gives a  popup as return and there is no data in ET_ZTERM.

until one of the value is selected on the popup.

but how could I get that popup when I click on my custom field search help? please suggest is my idea totally wrong.

thanks in advance

Regards

surendra

Accepted Solutions (0)

Answers (2)

Answers (2)

surendra_battula
Participant

I have managed to fix it this way

1) I have used a wrapper function module where it called FI_F4_ZTERM

2) created a elementary search help and used this function module as  a search help exit.

3) linked the data element zterm to the search help

4) assigned this data element in a structure and linked this structure in whitelist f4

5) linked personas f4 screen element to the field zterm in the structure.

Regards

surendra

former_member89149
Participant
0 Kudos

Can anyone explain me this way in more details?

1) What is the wrapper function module? And where should this module be created?

2) Do I need to write the js code for creating rfc and give parameters to it?

0 Kudos

Hi Surendra,

This FM is not "Remote Enabled module", so it cannot be called using scripting. What you can do is write a simple wrapper FM which is remote enabled, and call this FM from your wrapper module.

Also, I believe FI_F4_ZTERM  provides an import parameter "I_NO_POP_UP" which when set true, does not shows the pop up. Try setting this flag true first using the setparameter?

Sushant

surendra_battula
Participant
0 Kudos

Hi Priyadarshi

thanks for the reply. I have created a wrapper function module as rfc and calling the standard function module setting parameter as 'X' for no_pop_up and it comes up with values without a popup screen.

as below image when I click on the field f4 help can I get the values from that rfc  as  a selection list.

the output of the rfc is  a  table type with   values and its descriptions.

I am using the below script

var rfc=session.CreateRFC("ZFI_ZZTERM",'');

rfc.setParameter("I_KOART",'D');

rfc.setparameter("I_NO_POPUP",'X');

rfc.requestResults(JSON.stringify(["ET_ZTERM"]));

rfc.send();

var zterm=JSON.parse(rfc.getResults("ET_ZTERM"));

session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2000/subSCREEN_1010_RIGHT_AREA:SAPLBUPA_DIALOG_JOEL:1000/ssubSCREEN_1000_WORKAREA_AREA:SAPLBUPA_DIALOG_JOEL:1100/ssubSCREEN_1100_MAIN_AREA:SAPLBUPA_DIALOG_JOEL:1101/txtPersonas_1440597072718").text = ZTERM;

please can I be assisted.