on 08-27-2015 11:58 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.