Passing list of pernr into function module
Hi,
I need to buid one Function module in which if i pass the list of pernr, I should get one structure of appraisal document
I have created import parameter of HRPERNR type but when i loop is through that parameter it is saying it is not table type
please guide me in writing this FM
Hi,
You can create a parameter table, on tab table like your parameter importing HRPERNR.
Atte,
Romerito Mendes Silva
Similar Messages
-
Calling SAPF124 into function module
Hi experts,
I am calling the SAPF124 program into function module .....i have the posting date as range
in function moduel i want to pass through range can anyone help me how to pass it
if its from and to range means i am able to pass it easily.
but if its range like 1 3 5 means i m unable to pass. kindly help me to sort out this issue.
Regards,
Ajay.Hi Vijay,
Actually i have created one functiopn module with
*Inputs :: -- input parameter*
I_COMPCODE LIKE BSEG-BUKRS
I_YEAR LIKE BSEG-GJAHR
I_DATE TYPE BKPF-BUDAT
I_KUNNR LIKE BSEG-KUNNR
I_KUNNR1 LIKE RFPDO-F123KUNN
IN tables
I_FORMAT LIKE ZASDD3(Belnr)
i am calling the zsapf124 in this function module
as below code .through function module i should pass the inputs to the program.
hope i have already attached ma code
DATA : z_belnr TYPE RANGE OF belnr_d,
wa_belnr LIKE LINE OF z_belnr.
LOOP AT I_FORMAT[] into I_FORMAT.
wa_belnr-low = I_FORMAT.
wa_belnr-sign = 'I'.
wa_belnr-option = 'EQ'.
APPEND wa_belnr TO z_belnr.
clear : wa_belnr,I_FORMAT.
ENDLOOP.
submit ZSAPF124 WITH BUKRX eq I_COMPCODE
WITH GJAHX eq I_YEAR
WITH DOCNR EQ z_belnr
WITH KONTD eq I_KUNNR
with X_KUNNR eq I_KUNNR1
exporting list to memory
and return .
Regards,
Ajay.
Edited by: srinivasan12345 on Dec 3, 2011 3:43 PM -
How to pass select-option filed to Function Module Exporting Parameter
Hi,
How to pass select-option filed to Function Module Exporting Parameter.
ThanksHi,
DATA: BEGIN OF ITAB5_WRK OCCURS 0,
KUNNR TYPE KNKK-KUNNR, "CUSTOMER #
SBGRP TYPE KNKK-SBGRP, "CREDIT REP
KLIMK TYPE KNKK-KLIMK, "CREDIT LIMIT
NAME1 TYPE KNA1-NAME1, "CUSTOMER NAME
SKFOR TYPE KNKK-SKFOR, "TOTAL A/R
AMT1 TYPE KNKK-SKFOR, "CURRENT
AMT2 TYPE KNKK-SKFOR, "01-30
AMT3 TYPE KNKK-SKFOR, "31-60
AMT4 TYPE KNKK-SKFOR, "61-90
AMT5 TYPE KNKK-SKFOR, "91-120
AMT6 TYPE KNKK-SKFOR, "OVR 120
BZIRK TYPE KNVV-BZIRK,
END OF ITAB5_WRK.
SELECT-OPTIONS P_COMP FOR T001-BUKRS
SELECT KUNNR SBGRP FROM KNKK
INTO TABLE ITAB5_WRK
WHERE SBGRP IN P_REP
AND KUNNR GE '0001000000'
AND SKFOR NE 0.
LOOP AT ITAB5_WRK.
DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
ENDLOOP.
PERFORM GET_CREDIT_LIMITS.
*=======================================================================
IF P_DIST NE SPACE.
LOOP AT ITAB5_WRK.
SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
AND VKORG EQ P_COMP
AND VTWEG EQ '20'
AND SPART EQ '10'
AND BZIRK IN P_DIST.
IF SY-SUBRC EQ 0.
MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
MODIFY ITAB5_WRK.
ELSE.
DELETE ITAB5_WRK.
ENDIF.
ENDLOOP.
ENDIF.
*==============================================================
LOOP AT ITAB5_WRK.
MOVE: 'F/S' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
PERFORM AGING.
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MOVE: 'SPEC' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
*PERFORM AGING.*
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MODIFY ITAB5_WRK.
ENDLOOP.
FORM AGING.
*CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'*
EXPORTING
BUKRS = P_COMP
KKBER = WRK-KKBER
KUNNR = WRK-KUNNR
RASID = 'FEND'
KLIMP = 'X'
IMPORTING
SFAE1 = W_SFAE1
SFAE2 = W_SFAE2
SFAE3 = W_SFAE3
SFAE4 = W_SFAE4
SFAE5 = W_SFAE5
SFAE6 = W_SFAE6
SFAEL = W_SFAEL
SNFA1 = W_SNFA1
SNFA2 = W_SNFA2
SNFA3 = W_SNFA3
SNFA4 = W_SNFA4
SNFA5 = W_SNFA5
SNFA6 = W_SNFA6
SNFAE = W_SNFAE
EXCEPTIONS
NO-AGING_SCHEDULE = 1
NO_TABLE_INPUT = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
WHEN 2.
MESSAGE E999 WITH 'DO NOTHING ??'.
ENDCASE.
ENDFORM. "AGING
Thanks -
Hello friends,
I am displaying values ie, amounts in the screen using write statements here i have to display the
sign left side , i am using Function module 'CLOI_PUT_SIGN_IN_FRONT'
Does anybody help me - How to pass paramter into this Function module.
Regards,
PhaneendraIf you look to the code of the function module, you can see it is condensing the value.
I would make a copy of this function, and remove the condense lines to give the result you want.
data: text1(1) type c.
search value for '-'.
if sy-subrc = 0 and sy-fdpos <> 0.
split value at '-' into value text1.
condense value.
concatenate '-' value into value.
else.
condense value.
endif. -
Pass Parameter ID from Main Program into Function Module
For material, there is a fileds product hierarcy (MARA-PRDHA) on Basic view, but we also append the same field in materail sales view (MVKE-PRDHA) and put on the screen of sales view, so the user want the PRDHA on sales view could be updated automatically when it has been changed on Basic view. On the screen of basic view, the field MARA-PRDHA is set as parameter ID 'VPR', the sales views are updated in function module MVKE_SET_DATA, so how can I get the value of parameter ID 'VPR' in MVKE_SET_DATA to populate the value in Sales View?!
Does parameter IDs and their values locate in global memory?!
if yes, why i can't get it with: GET PARAMETER ID "VPR' <f>?
Any idea?!
ThanksYes, this is SAP standard program for MM41/MM42 (Article material), I can't change the program and the screens are different for basis and sales views. So, I am just wondering whether there is a way to pass the parameter value of product hierarchy on basic view to any other screen process when it's updated on basic view.
The problem is the program check every single table (views) in individual function module, so it's hard to pass any updating (not updated) value from any other views.
Thanks -
How to create dropdown list for custom remote function module
HI ,
I created a custom remote function module for a ztable.table having four fields.But now the requirement is to maintain the dropdown list for input parameter .
For eg: I maintain Input parameter as action.For that Action we have to maintain a dropdown list(display,insert,update and delete values ) in function module.Is it possible.Hi
Try using POPUP_GET_VALUES function module in the begining of the Function module this gives a POP to provide a value to you
In this you can provide a value
Check the import parameters of this Function module if it has COMBOBOX as parameter ( I dont have SAP access at this point of time) you can pass X to it so you get List box for the following fields
Create a domain to field and assing fixed values to it and use it in any table(As this works with only existing tables)
refresh fields.
DATA: fields LIKE SVAL OCCURS 0.
fields-tabname = 'MAKT'.
FILEDS-FIELDNAME = 'MAKTX'.
APPEND FIELDS.
CALL FUNCTION 'POPUP_GET_VALUES' " Try copying this in a Test program and execute
EXPORTING
POPUP_TITLE = 'Enter Mail Id here'
START_COLUMN = '5'
START_ROW = '5'
IMPORTING
RETURNCODE = SRETURN
TABLES
FIELDS = FIELDS.
Cheerz
Ramchander Rao.K
Edited by: Rob Burbank on Nov 23, 2011 9:50 AM -
Passing Internal Table to a Function Module.
I am new to Web Dynpro Abap. Using the Function Builder, I am trying to pass an Internal Table (IT) as an import parameter into my Function Module (FM), fill it within the FM and be able to recieve the filled IT back as an Export parameter from the FM to my program. My problem here is that I do not know how to specify the Internal Table as an import OR export parameter for a Function Module, I tried using the Table Tab, but it says that is obsoleted.
Anyone! Thanks.Hi,
You want to pass the internal table to FM inside WD component and that table contains fields from diff table, right?
Open the FM through SE37. Goto 'Tables' tab of FM. Create table of type mentioned in the 'Associated Type' column of the FM. Fill the internal table with data and pass the internal table to FM.
You can create Table type with different fields through SE11.
I hope I interpreted your question correctly.
Regards,
Saket. -
How to pass dynamic logical expression to function module
Hi,
I'm using FM META_READ_TABLE as below:
As mentioned above im using META_READ_TABLE FM to get company codes from CSKS table of ECC. Below is the code im using:
DATA:i_opt type STANDARD TABLE OF RFC_DB_OPT, i_fld type STANDARD TABLE OF RFC_DB_FLD,
i_res type STANDARD TABLE OF TAB512.
Constants: c_expr(72) TYPE c VALUE 'KOSTL EQ COST_CTR', c_fld(5) TYPE c VALUE 'BUKRS'.
w_opt-text = c_expr.
w_fld-FIELDNAME = c_fld.
append: w_opt to i_opt,
w_fld to i_fld.
data i_control type STANDARD TABLE OF BBP_CONTROL_RECORD.
**&&--Get Co code from ECC (CSKS table)
CALL FUNCTION 'META_READ_TABLE'
EXPORTING
QUERY_TABLE = c_table
* DELIMITER = ' '
* NO_DATA = ' '
* ROWSKIPS = '0'
* ROWCOUNT = '0'
LOGICAL_SYSTEM = v1_logsys
TABLES
OPTIONS = i_opt
FIELDS = i_fld
DATA = i_res
CONTROL_RECORD = i_control.
however it is giving me 'Communication Error' while executing this piece of code. I guess the problem here is with passing query to i_opt table. obviously the way im doing this is wrong and it has to be dynamic. Could anybody please give me idea how to execute fm with dynamic query i.e., 'KOSTL EQ COST_CTR' where COST_CTR is cost center and an importing parameter to this.please advise.
RgdsThe "communication error" would seem more likely to be a problem with an RFC call - does 'META_READ_TABLE" call another function in the remote system?
We don't have that function module here (is it SRM?) but you should be able to construct your dynamic "where" something like this (p_kostl is the variable in this example):
data:
l_where type text72.
concatenate
'KOSTL EQ_'
p_kostl "variable
into l_where.
translate l_where using '_ '. "replace underscore with space
Jonathan -
Is it necessary to pass RETURN parameter in bapi function module
Hai All,
Is it necessary to pass structure to RETURN parameter in bapi_transaction_rollback function module. If it is not necessary then how can it gives return value. Please give me the answer for this one. some sample code below...
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
RETURN = i_return.
LOOP AT i_return into wa_return WHERE type EQ c_error.
wa1_out-postdoc = wa_return-message.
ENDLOOP.
Thanks & Regards.
Laxman.Phi
bapi should never throw an error as it might be called for mass data proceessing
and it is prefferred not to hault the proceess bcoz of one or two errors.
that's why the error or success messages are caught and returned in return table.
in bapi_transaction_rollback the return parameter is not necessary as it will work without that as well.
the purpose of rollback bapi is just to undo whatever done before that.
regards
vijay
<b>reward points if helpful</b>
Message was edited by:
vijay sharma -
Error while passing a table to a function module
Hi Iam passing a table g_tab of length 376 flat structure to the function module..under TABLES section parameter.
Changedocument_read_headers.
iam getting a complile time error like the below displayed thing. Can u tell me how to solve this ?
In the function module interface, you can specify only
fields of a specific type and length under "I_CDHDR".
Although the currently specified field
"G_CDHDR_TAB" is the correct type, its length is incorrect.
Edited by: kiran kumar on Jul 7, 2008 8:53 AMprobably u making a mistake while declaring the table
declare it like this in the tables section:
S_JOB LIKE RNGE_OBJID
where s_job is the internal table name and RANGE_OBJID is a structure type and NOT an internal table type. -
Passing the structure to rfc function module
hi,
iam having a rfc function module which is importing structure.
i have to pass only one field value to that structure.
how can i pass that field value to that structure.
it is very urgent.
thanks in advanceHi..
You have to Declare the ACTUAL PARAMETER (workarea) with the Same Structure as that of the FORMAL PARAMETER.
but you can fill only the FIELD that you want pass in the workarea and pass it to the RFC.
<b>Reward if helpful.</b> -
Passing the parameter in the Function module MESSAGE_SEND_AS_MAIL
Hi all,
I have to send the same message to five different mail ID's using the Function module MESSAGE_SEND_AS_MAIL
How to pass this five mail ID's in the Parameter Reciever of the Function module
Regards
Ajaysee if this helps
REPORT Z_MESSAGE.
data receiv type standard table of SOMLRECI1 initial size 0.
data wa type SOMLRECI1.
wa-receiver = 'email address in caps'.
wa-REC_TYPE = 'U'.
append wa to receiv.
wa-receiver = 'email address in caps'.
wa-REC_TYPE = 'U'.
append wa to receiv.
do so more more three
CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
EXPORTING
msgid = 'Z_ZZZ_CA_MESSAGES'
msgno = '000'
MSGV1 = 'material'
MSGV2 = 'MAT'
MSGV3 = 'MM'
MSGV4 = 'MMM'
tables
receivers = receiv[]
COMMIT WORK AND WAIT.
then u can go to SOST transaction and see that the mail has been or is yet to be sent. It worked for me. The message comes in an PDF form to the mail box.
Edited by: Biswadeep Ghosh on Jun 25, 2008 2:28 PM
Edited by: Biswadeep Ghosh on Jun 25, 2008 2:30 PM -
How to pass select option value to function module while using service call
Hi,
I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
rgds
sudhanshuHi,
Thank s for your reply. In fact im doing similar with following variation:
i) collected range values using get_range* method.
ii) separate low and high values as:
read table <field2> index 1 into wa_range.
vert2_low = wa_range-low.
vert2_high = wa_range-high.
(Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
iii) Now setting these RFC attribute as:
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_LO`
value = vert2_low ).
and
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_HI`
value = vert2_high ).
iv) In RFC im having my query as :
select <fld list> from BUT000 into table itab where vertical in r_vert.
Here, r_vert is a range defined as:
ranges r_vert for <fld refrence>
r_vert-sign = 'I'.
r_vert-option = 'BT'.
r_vert-low = S_VERT_LO.
r_vert-high = S_VERT_HI.
append r_vert.
Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
Please suggest.
Rgds
Sudhanshu -
How to convert a Tcode into Function module or a Bapi
Dear all,
i would like to convert Tcode : ME21N into a Function module or a Bapi to create a Webservice.
Kindly help me..!!
Thanks in advance..
SreeKumar..Hey,
Is the existing BAPI 'BAPI_PO_CREATE1' not sufficient for your needs?
Till now never had to do something with webservices but this service ...maybe it does exist already...
seems a likely candidate to be converted by SAP. So you do no need to re-invent the wheel again...and again...
Cheers,
BV. -
How to pass BI Query parameters from Function Module
Hi,
We are executing the BI queries using the Function Module "RS_VC_GET_QUERY_VIEW_DATA_FLAT" by passing the query name and the provider information.
Is there a way, to pass the filter parameter values also to the query by using this function module? I am not sure how the VC tool is using this Function Module to call the BI queries and passing the filter values.
Your help is appreciated.
Thanks
SuriSuryanarayana,
Are you trying to execute a query in batch?. If you want to execute try to look at WRITEQUERY - which is a standard SAP program. You can execute this program directly or you can customize it completely and produce the output in .CSV file.
Hope this helps. Award points if useful.
Goodluck,
Alex (Arthur Samson)
Maybe you are looking for
-
Member Formula: IF ... ELSE do outline aggregation
Hi experts, How to write a formula for a parent entity member like this: IF (@ISMBR("Account member")) do something ELSE do default outline aggregation from its descendants ENDIF Because I just want the "Do something" execute for some account member.
-
Post-Tiger Upgrade: Mail won't import!
Hi, I've upgraded to Tiger with no problems, but I'm having great difficulty with mail ever since. Initially it copied all my old mail over, but it placed it in my home directory, doubling in size in the process. When I tried moving it to another dri
-
My iPod keeps stopping when i download songs to it
I first had a problem with downloading music to my ipod because it said that there was a corruption, so I format my ipod and then I start having a bunch of other programs installing the software but I fixed that. Now when I update songs on to my iPod
-
Report not display in report viewer
i try to show ssrsc reports in asp.net web page using report viewer code protected void Button1_Click(object sender, EventArgs e) ReportViewer2.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; ReportViewer2.ServerReport.ReportServ
-
I'm building tables for an e-commerce site. Exporting them to CSV. Works great, except for one thing. Some article numbers start with a 0 and for some reason, numbers has decided to remove all starting 0. And that is driving me up a tree. I need them