2008 Aug 12 6:48 AM
Hello All,
I am developing one RFC which will retrieve some data from SAP HR module depending on First name. I have declared VALUE as a import parameter.
when i write below query is works properly.
SELECT pernr cname gbdat FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE wa_PA0002
WHERE VORNA LIKE 'Prashant'.
My requirement is to accept the name from user.
But when I write query like this
SELECT pernr cname gbdat FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE wa_PA0002
WHERE VORNA LIKE VALUE.
It does not work.
Please help me if anybody have any clue about the same. I have also tried with u2018=u2019 sigh, but no success.
Thanks in advance,
Prashant
2008 Aug 12 7:05 AM
Hi Prashant,
We too faced similar type of issues while we are developing RFCs.
When you are executing the RFC standalone ( without calling from portal), then all the inputs that are given to the Function Module will be changed to UPPER CASE( standard working procedure of FM)
Here in the value paramter if the input value is "Prashant",
it will change to "PRASHANT" and will search for records with that particlar format, but not the records with "Prashant"
Note: But generally in tables there is some another field which stores the name in UPPER CASE whatever the format user enters
Example:
If user is saving the record with name Prashant, then
VORNA contains the value "Prashant"
and another field wil be there in the same table which stores the vlaue as "PRASHANT".
So if you get teh field, then change the select query as follows :
SELECT pernr cname gbdat FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE wa_PA0002
WHERE < use the field which stores the name in UPPER CASE> LIKE VALUE.
Try checking with this field (VNAMC in PA0002 table). Iam not sure but i think it will save the first name in UPPSER CASE and try to use this filed name in the where clause.
Hope this will help.
Regards,
Swarna Munukoti
Edited by: Swarna Munukoti on Aug 12, 2008 8:07 AM
Hi Prashant,
We too faced similar type of issues while we are developing RFCs.
When you are executing the RFC standalone ( without calling from portal), then all the inputs that are given to the Function Module will be changed to UPPER CASE( standard working procedure of FM)
Here in the value paramter if the input value is "Prashant",
it will change to "PRASHANT" and will search for records with that particlar format, but not the records with "Prashant"
Note: But generally in tables there is some another field which stores the name in UPPER CASE whatever the format user enters
Example:
If user is saving the record with name Prashant, then
VORNA contains the value "Prashant"
and another field wil be there in the same table which stores the vlaue as "PRASHANT".
So if you get teh field, then change the select query as follows :
SELECT pernr cname gbdat FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE wa_PA0002
WHERE < use the field which stores the name in UPPER CASE> LIKE VALUE.
Try checking with this field (VNAMC in PA0002 table). Iam not sure but i think it will save the first name in UPPSER CASE and try to use this filed name in the where clause.
Hope this will help.
Regards,
Swarna Munukoti
Edited by: Swarna Munukoti on Aug 12, 2008 8:07 AM
2008 Aug 12 6:53 AM
i think the value inside VALUE field may be in captial letter.
plz check it.
Regards
Anbu
2008 Aug 12 7:05 AM
Hi Prashant,
We too faced similar type of issues while we are developing RFCs.
When you are executing the RFC standalone ( without calling from portal), then all the inputs that are given to the Function Module will be changed to UPPER CASE( standard working procedure of FM)
Here in the value paramter if the input value is "Prashant",
it will change to "PRASHANT" and will search for records with that particlar format, but not the records with "Prashant"
Note: But generally in tables there is some another field which stores the name in UPPER CASE whatever the format user enters
Example:
If user is saving the record with name Prashant, then
VORNA contains the value "Prashant"
and another field wil be there in the same table which stores the vlaue as "PRASHANT".
So if you get teh field, then change the select query as follows :
SELECT pernr cname gbdat FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE wa_PA0002
WHERE < use the field which stores the name in UPPER CASE> LIKE VALUE.
Try checking with this field (VNAMC in PA0002 table). Iam not sure but i think it will save the first name in UPPSER CASE and try to use this filed name in the where clause.
Hope this will help.
Regards,
Swarna Munukoti
Edited by: Swarna Munukoti on Aug 12, 2008 8:07 AM
2008 Aug 12 7:20 AM
Thanks Swarna,
I have checked the condition with the VAMC.
Points are awarded.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |