How to insert a code for a function module into a Customer Exit Variable?
I have two Key Figures viz., Net Prchs Rtl, and Net Prchs Unt. Both these Key figures have This Week (TW) and Last Week (LW). There is a variable for This week but there is no variable defined for Last week.
I need to get data in the column LW (Last Week) for both the key figures.
In function module EXIT_SAPLRRS0_001 one of the functions I have is:
Get the previous Fiscal Week
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
I need to create a new variable to get values in the Last week column for different key figures and use function 'DATE_TO_PERIOD_CONVERT' in that variable.
Can anyone please explain me the steps as to how to use a function module in a variable so that when the variable is used in a key figure it shows the output.
In other words what I want to know is after creating a Customer exit variable of type Characteristic value how do I refer the above mentioned function moduel and insert the code for the function module into the Customer exit variable that I created.
Thank you.
TR.
Hi Wond,
Thanks a lot for your reply. I understand what you mean but I have never done this before so can you please explain it in a detailed manner. I have the following code:
Get the previous Fiscal Week
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = ld_date
i_periv = lc_periv
IMPORTING
e_buper = ln_poper
e_gjahr = ln_bdatj
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
lc_poper = ln_poper.
CONCATENATE ln_bdatj lc_poper+1(2) INTO wa_e_t_range-low.
wa_e_t_range-sign = 'I'.
wa_e_t_range-opt = 'EQ'.
APPEND wa_e_t_range TO e_t_range.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
I believe I should now use the above code in my customer exit variable. If that's right can you please explain me the steps as to how should I do this so that the variable gets populated.
Thank you.
Regards,
TR.
Similar Messages
-
Storing the output of a function module into a custom table
Hi Gurus,
Is it possible to store the output of a function module into a custom table.How can this be done?Is it complex?hi,
After u execute the FM and get values in the internal table ITAB_RESULT. Create a custom table having structure same as ITAB_RESULT call it ZRESULT.
data :wa type ITAB_RESULT.
call FM and get result it ITAB_RESULT
loop at itab_result.
move-corresponding itab_result to wa.
insert wa to ZRESULT.
endloop.
Regards,
Mansi. -
How to add Test data for a function module
Hi experts,
i want to add test data for a function module . i don't know how to proceed on it . please help me...
with regards,
James...
Valuable answers will be rewarded...Hi,
- Go to SE37 and execute your FM
- Enter the data you want to pass to FM
- Hit 'Save' button. Enter the meaningful name for your test scenario and save. That's it you have saved the test data.
You can also enter some other test data and save that also. In short, you can save multiple test scenario. Also, you can give multiple test scenario a same name and they do not overwrite each other ( but normally you give different name to differentiate them)
Next time you come to execute the FM again, hit the "test data" button and it will show you all the test scenario you have stored before. Select the one you want to use and it will load the data in FM parameters.
Let me know if you need any other information.
Regards,
RS -
Need code for a function module- Urgent
Hi friends,
I have a requirement where I am giving material description as an import parameter in the function module. ( Material description could be a wild search -- say - Mat* ) I want a sub routine in the function module which should get all the materials from the database ( mara or makt..not sure ) for the user entered Material description.
I want this particular code to be written using a sub-routine using formal parameters inside this fm . Could any one send me the code for this.
Thanks in advance,
Vishnu.Hi Vishvanath,,
Please find the below code.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE makt-MATNR,
MAKTX LIKE makt-MAKTX,
END OF itab.
DATA : BEGIN OF itab1 OCCURS 0,
matnr LIKE makt-MATNR,
MAKTX LIKE makt-MAKTX,
END OF itab1.
data : a(5) type c value 'TEST'.
perform mat_no using a.
form mat_no using p_a.
data : lv_temp(4) type c.
select matnr maktx from makt into table itab.
loop at itab.
lv_temp = itab-maktx+0(4).
if lv_temp = p_a.
move itab to itab1.
APPEND ITAB1.
endif.
endloop.
loop at itab1.
write :/ itab1.
endloop.
endform. " mat_no
Thanks.
Amjad. -
Creating Java code for the function module
Hi Colleagues,
I have a fuction module in ABAP system. Now I want to Generate java code for the FM.
I cam to know that we can achive that using AXIS, By getting the XML file for the fuction module and generate Java
Class file using that XML file.
Can any one tell me how to achive it.
Or any other way to do that?
Please provide you valid suggestions.
Regards,
SathyaHi,
You can integrate axis2 in eclipse. I think you have to find the plugin for that.
After that you can let axis generate the jave code (stubs and proxies) for your web service via the wsdl file.
Kind Regards,
Robin -
How to copy a generic extractor with function module into a new system?
Dear Gurus,
i would like to know how i can copy a gneric datasource with function module from one system to the target system.
Thank you
CheersHi Anesh,
thank you for replying.
Since the Datasource will have a new new in the new system, i will create a new one.
Create a generic datasource base on the table is not the problem.
My problem is how could i copy the FM in the new system?
If you can help me on that, it will be fine.
Thanks -
How to change a Manual Input variable into a customer exit variable?
Hello,
I need to change the "processing by" option of an used BEx variable from "Manual Input" to "Customer Exit" but this field is not available (= in grey) in modification.
Does it exist a tip or a standard program to modify this no-accessible field of an existing BEx variable?
Thanks in advance for your answers,
SamuelHi,
I don't think it's possible (unless tweaking some parameters directly in some tables, as stated in the previous post) so you would have to create a new one and replace it.
Hope it helps, -
How to creat web service for a function module?
who can provide me some resource on the topic.
thanks
Johnney.Hi John,
http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/content.htm
Reward Points if Useful
All the Best
Gokul -
How to insert / Update value for PFAKT in BP Relationship
Hi Friends / Experts,
How to insert the value for PFAKT ( Function value ) in BP Relationship in BP tcode , in SAP CRM.
I have tried it but it BAPI_BUPR_CONTP_CREATE. But I need it with BAPI_BUPR_RELATIONSHIP_CREATE Function Module.
Please help me out.
Any Enhancement points in BAPI_BUPR_RELATIONSHIP_CREATE or any user exists. Please let me know.
Regards,
KMF.you can also acheive this using MERGE( available in sql 2008 and above).
also, you are referring to DTS. DTS is legacy solution now..are you using sql 2000, you can use ssis, if you want and it available in sql 2005. as said, there are multiple ways you can do this.. it find the below one a easy solution, since your are
talking about only one table..
try this example..
create table test1(sno int primary key,sname varchar(20),scity varchar(20))
go
create table test2(sno int primary key,sname varchar(20),scity varchar(20))
go
insert into test1
values(1,'stan','atlanta'),(2,'william','newyork')
go
insert into test2
values(1,'robin','orlando')
go
--set this in you sql job and let it run for every half an hour
MERGE test2 t2
USING test1 t1
ON t2.sno = t1.sno
WHEN MATCHED THEN
UPDATE
SET t2.sname = t1.sname,t2.scity=t1.scity
WHEN NOT MATCHED by target THEN
Insert(sno,sname,scity)
values (sno,sname,scity);
go
--check this table and clean up
select * from test2
go
drop table test1
go
drop table test2
Hope it Helps!! -
How to write a code for cumulative values..
Hi
Can any one proivde the Sudo code for Customer exit at Reports.
I need to write a code for when ever user input Calaender month then querry calucalate the cumulative values also.
How to write a code for cumulative values..
Example:
Customer -Sales.Quantity(CalMonth)--- Sales.quantity(Cumulative Month)
1000--223--
2200
Regards
mannev.hi mannev,
to get an idea, search in SDN
for example
customer exit code
with hopes,
Raja Singh -
How to save function module in a custom table..
hi experts,
i need your help, how can i save a customize function module into a custom table?is this possible?
i need your reply ASAP..
thanks,
mauHi,
pls chk this links:
Generic extraction via function module blog siggi
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Generic extraction via function module
BW genenric delta not TABLE but VIEW
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801ee8454211d189710000e8322d00/frameset.htm
Re: how to use a function module
http://help.sap.com/saphelp_nw70/helpdata/en/2a/f9ff95493111d182b70000e829fbfe/frameset.htm
**pls assign points,if link is useful*
Regards
CSM Reddy -
How to create a transaction code for a function group with screen 100 as st
Hello ,
I have requirement where I need to create a function group and create screen 100, 200, 300 and include the function in the screens.
Customer asked me to create a transaction with the screen 100 as the starting screen.
Can you please let me know how to create a transaction code for a function group with screen 100 as starting screen.
[ It is not a module pool program ].
Thanks
Prashanth.
Moderator message - Please ask a specific question and do not ask the forum to do your work for you - post locked
Edited by: Rob Burbank on Jun 2, 2009 11:49 AMGo to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
Name of screen field: Value
D_SREPOVARI-REPORTTYPE RW
D_SREPOVARI-REPORT ZPCA
Save and transport accordingly. -
How to code a predifined function module in sap ,in se37.
can any one tell me how to code a predifined function module in sap ,in se37.it's an immediate requirement.if u give a brief description it'll do.
Hi Henry,
There are two possible ways in which I can interpret your question.
1. You want to create a new Function Module in SE37. you will have to refer to the <a href="http://help.sap.com/saphelp_47x200/helpdata/en/d1/801e9a454211d189710000e8322d00/frameset.htm">Function Builder</a> tutorial for that.
2. You want to use an existing function module in your program. In the code of your program in SE38, click the button <i>Pattern</i>. On the pop-up, give the name of the function module that you wish to use in your program.
Regards,
Anand Mandalika. -
How to use Exceptions for a function module
Hi folks,
I have created a new function module.Its working fine, but i am not aware of using exceptions for a function module. I hav just declared an exception in the 'exception' tab. Could any body explain me how to use that in my FM source code....Thanks...Hi Shyam,
Have a look at this,
START-OF-SELECTION.
gd_file = p_infile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gd_file
has_field_separator = 'X' "file is TAB delimited
TABLES
data_tab = it_record
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc NE 0.
write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
skip.
endif.
Regards,
Sai -
How to activate uni code check in function pool.
hi experts,
how to activate uni code check in function pool.
pls give needy
regards,
praveenhi praveen,
for every report we can check unicode flag in the attributes.
function pool is also a type report.
for classes it is not possible to enable directly.
for this we have TCODE UCCHECK.
enable it by using above.
Maybe you are looking for
-
Video Meetup: Risk Mitigation in a Post Windows Server 2003 World
The End (of Support) is coming! If you aren't going to migrate in time, or are even planning not to move some of your servers over, we've got some tips and best practices for minimizing your exposure to the threats at hand. We've got an expert from C
-
Happy New Year In Advance To All
Hi Friends, It's time to celebrate New Year with all forum members. Welcome *2010* in advanced and be a part of this wonderful family. ;) !http://crazywebsite.com/Website-Clipart-Pictures-Videos/New-Year-Graphics/Animated-Walking-Monkey-Happy-New-Yea
-
Hi All, I know ADSSO is not applicable for Web Agent. But would it be possible to choose an authentication provider using Web Agent? The scenario happens when there is a new PC that needs to connect to the network to install Clean Access
-
Firefox fails to load the GoToMeeting application and says that I should enable Java. The Java plug-in is already enabled. I don't know what to do to get this working again.
-
IDCS5 Win - changing mouse cursor
At times I have code that processes a lot of data in ways that are not amenable to progress bars (for example, saving a single, large file to disk). During those times I would like to change the cursor from its standard arrow to another standard suc