Searching for function modul which insert adressdata bevor fm vendor_insert
hello,
i read many threads, but I find no solution.
I want use the fm vendor_insert for a migration. But using the fm vendo_insert require an existing address entry.
Is there any central fm which create the whole address.
regards
Kim Werner
Hi Mahesh,
Very good questions. Infact it's very difficult to answer all the questions.
You can search many FAQs in net...
If you have any specific questions related to single topic, Post message for each.
I can send some of FAQ documents to u
Answers
1) Using Index like Field(1)-1st record field , Field(2) - 2nd record field etc... in Table control.. we can handle BDC
2) BAPI will be programmed using OO concepts more.. and as Interfacing is more enhanced here than normal FM.
etc...
Regards,
Manjunatha
Similar Messages
-
Hi @all,
I`m searching for a function module to load customer confirmation data (CRM 4.0 Add on SI, IPM) to license sales contracts.
Does anybody know this interface?
Kind Regards
OliverTo load confirmation data I have used CRMXIF_ORDER_SAVE (The same used to create contracts).
You should:
--> on segment data-item-dates-data, load values for IPMCONFFROM, IPMCONFTO, IPM_EXC_DATE appointment
--> on segment data-item-cumulation_item-data, load quantities and values, with cumulation rule (Per Period or Inception To Date)
I give you a tip: load a confirmation manually, then look with transaction SMW01 at the bDoc (BUS_TRANS_MSG type) that is generated.
Bye
Marco -
Function Module to Insert Agent assignment upon creation of Responsibility
Hi Friends,
Using BDC I am able to create Resposibilities in Responsibilities tab of PFAC tcode.
I need to insert Agent assignment under created Responsibility.
Actually In Tcode PFAC I enter Rule then select change button this will lead us to next screen there i select Responsibilities tab
there I select create button then it will give a pop-up in that i will enter Object abbr. and Name then i will select continue.
then next i will enter category then select save.
Up to this using recording I am able to create Responsibilities but here i need to come back and i need to select just now created
Responsibility and i need to select insert agent assignment icon then it will give popup there i need to select Orgnizational unit then continue then it will give small popup ther i need to give search term (what ever we entered in Object abbr.) then continue again one popup will come ther we need to select that Org.unit check box then continue then it will one more popup there i need to select create then it will be inserted under Responsibilitty.
In the above entire explanation I am able do upto create Responsibilities but to insert agent assignment we need to come back after save but it is not possible through Recording because after save Recording will be ended.
So could you please guid me how to insert agent assignment under just created Responsibility.
If there is any function module to do that please suggest me .
Thanks
ChanduHi,
I tried like that also.
Whenever we need to insert agent assignment under just created Responsibility we need to select just created responsibility
created by first BDC . But in seccond BDC WITH TCODE OOCU_RESP Recording is not capturing that action (selecting just created Responsibility).
It is giving the message 'You did not select a valid object' in the status bar.
So It is unable to insert agent assignment under responsibility.
I think there would a function module which insert agent assignment under selected responsibility.
If anybody knows please suggest me or am I making any mistake ?
If you would like to see my code pls find below.
*& Report YCRM_CREATE_REPBLT_AGENT
REPORT ycrm_create_repblt_agent.
*Selection Screen
PARAMETERS : p_rule TYPE pdtask-seark OBLIGATORY,
p_file TYPE rlgrap-filename OBLIGATORY.
*Data Declarations
TYPES : BEGIN OF ty_resp,
short TYPE p1000-short,
stext TYPE p1000-stext,
category TYPE ro_expr, "EDIT_BIND_DEF-EXPR_LOW(02),
END OF ty_resp.
DATA : it_resp TYPE TABLE OF ty_resp,
wa_resp TYPE ty_resp,
p_file1 TYPE string.
DATA : it_bdcdata TYPE TABLE OF bdcdata,
wa_bdcdata TYPE bdcdata,
it_bdcmsgcoll TYPE TABLE OF bdcmsgcoll,
wa_bdcmsgcoll TYPE bdcmsgcoll.
*Constants Declarations
CONSTANTS : c_x TYPE c VALUE 'X',
c_tcode(4) TYPE c VALUE 'PFAC',
c_mode TYPE c VALUE 'A'.
*AT SELECTION-SCREEN event for providing f4 help for input file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM file_on_f4.
*Start of selectin event.
START-OF-SELECTION.
File Upload
PERFORM upload_file.
*BDC Logic
PERFORM bdc_to_create_rep.
*& Form BDC_DYNPRO
text
-->P_0061 text
-->P_0062 text
FORM bdc_dynpro USING fp_program "value(p_0061)
fp_dynpro. "value(p_0062).
CLEAR wa_bdcdata.
wa_bdcdata-program = fp_program.
wa_bdcdata-dynpro = fp_dynpro.
wa_bdcdata-dynbegin = c_x.
APPEND wa_bdcdata TO it_bdcdata.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
text
-->P_0066 text
-->P_0067 text
FORM bdc_field USING fp_fnam "value(p_0066)
fp_fval. "value(p_0067).
CLEAR wa_bdcdata.
wa_bdcdata-fnam = fp_fnam.
wa_bdcdata-fval = fp_fval.
*WA_BDCDATA-DYNBEGIN = C_X.
APPEND wa_bdcdata TO it_bdcdata.
ENDFORM. " BDC_FIELD
*& Form FILE_ON_F4
text
--> p1 text
<-- p2 text
FORM file_on_f4 .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
field_name = 'P_FILE'
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " FILE_ON_F4
*& Form UPLOAD_FILE
text
--> p1 text
<-- p2 text
FORM upload_file .
p_file1 = p_file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_file1
has_field_separator = 'X'
CHANGING
data_tab = it_resp
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
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " UPLOAD_FILE
*& Form BDC_TO_CREATE_REP
text
--> p1 text
<-- p2 text
FORM bdc_to_create_rep .
LOOP AT it_resp INTO wa_resp.
REFRESH : it_bdcdata,
it_bdcmsgcoll.
*Screen 0600
PERFORM bdc_dynpro USING 'SAPLRHWS' '0600'.
PERFORM bdc_field USING 'BDC_CURSOR'
'PDTASK-SEARK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=AEND'.
PERFORM bdc_field USING 'PDTASK-SEARK'
p_rule. "'90000159'.
*Screen 0040
PERFORM bdc_dynpro USING 'SAPLRHWS' '0040'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=RESP'.
PERFORM bdc_field USING 'BDC_CURSOR'
'HRS1000-SHORT'.
PERFORM bdc_field USING 'HRS1000-SHORT'
'Z99999999972'.
PERFORM bdc_field USING 'HRS1000-STEXT'
'Category (RUN -SUPPORT) + C&PS Web'.
PERFORM bdc_field USING 'HRS1203-ACTOR_FLAG'
'R'.
*Screen 0040
PERFORM bdc_dynpro USING 'SAPLRHWS' '0040'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=INSE'.
PERFORM bdc_field USING 'BDC_CURSOR'
'DATESET'.
PERFORM bdc_field USING 'DATESET'
'O'.
*Screen 0300
PERFORM bdc_dynpro USING 'SAPLSPO4' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'SVALD-VALUE(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=FURT'.
PERFORM bdc_field USING 'SVALD-VALUE(01)'
wa_resp-short. "'PL-BK'.
PERFORM bdc_field USING 'SVALD-VALUE(02)'
wa_resp-stext. "'Plan - BendixKing Team'.
*Screen 0200
PERFORM bdc_dynpro USING 'SAPLRHUZ' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EDIT_BIND_DEF-EXPR_LOW(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'P1000-BEGDA'
'23.03.2011'.
perform bdc_field using 'P1000-ENDDA'
'31.12.9999'.
PERFORM bdc_field USING 'P1000-SHORT'
wa_resp-short. "'PL-BK'.
PERFORM bdc_field USING 'P1000-STEXT'
wa_resp-stext. "'Plan - BendixKing Team'.
PERFORM bdc_field USING 'EDIT_BIND_DEF-EXPR_LOW(02)'
wa_resp-category. "'z11'.
CALL TRANSACTION c_tcode USING it_bdcdata
MODE c_mode
MESSAGES INTO it_bdcmsgcoll.
IF sy-subrc <> 0.
MESSAGE i001(ymsg)."Error Message
ROLLBACK WORK.
ELSE.
REFRESH : it_bdcdata,
it_bdcmsgcoll.
**screen 0410
PERFORM bdc_dynpro USING 'SAPLRHUZ' '0410'.
PERFORM bdc_field USING 'BDC_CURSOR'
'P1000-OBJID'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CHG'.
PERFORM bdc_field USING 'P1000-OBJID'
p_rule. "'90000162'.
**screen 0420
PERFORM bdc_dynpro USING 'SAPLRHUZ' '0420'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=RELI'.
PERFORM bdc_field USING 'DATESET'
'O'.
**screen 0110
PERFORM bdc_dynpro USING 'SAPLRHW0' '0110'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CONT'.
**screen 0100
PERFORM bdc_dynpro USING 'SAPLRHWL' '0100'.
*perform bdc_field using 'BDC_CURSOR'
'PCHDY-SEARK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CONT'.
PERFORM bdc_field USING 'PCHDY-SEARK'
wa_resp-short. "'PL-BK'.
**screen 0120
PERFORM bdc_dynpro USING 'SAPMSSY0' '0120'.
*perform bdc_field using 'BDC_CURSOR'
'04/03'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
**screen 0400
PERFORM bdc_dynpro USING 'SAPLRHUA' '0400'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=INSE'.
*perform bdc_field using 'BDC_CURSOR'
'PERIOD-BEGDA'.
PERFORM bdc_field USING 'PERIOD-BEGDA'
'29.03.2011'.
PERFORM bdc_field USING 'PERIOD-ENDDA'
'31.12.9999'.
CALL TRANSACTION 'OOCU_RESP' USING it_bdcdata
MODE c_mode
MESSAGES INTO it_bdcmsgcoll.
IF sy-subrc <> 0.
MESSAGE i001(ymsg)."Error Message
ROLLBACK WORK.
ELSE.
MESSAGE i000(ymsg)."Success Message
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " BDC_TO_CREATE_REP
Guide me on this.
Thanks -
Search help(f4) for function module input
can we create a serch help for function module input giving process
Hello basichodary,
You can encapsulate the function module within a program. Include the search help in a parameter statement in the calling program and pass the parameter to the function module. For example, suppose you want to have field i_carrid to have a search help. Use the following code.
report call_function_module.
parameters p_carrid type s_carr_id matchcode object demo_f4_de.
call function 'FUNCTION_MODULE'
exporting
i_carrid = p_carrid
Kind Regards,
Rae Ellen Woytowiez -
Function module which uses both BAPI's for sales order create and change
Please name the function module which uses both BAPI's for sales order create and change.
BAPI_SALESORDER_CREATEFORMDAT2
BAPI_SALESORDERCHANGEYup.
you must write a piece of code for this.
with if else condition.first check if SO is exsist than use second FM to change it else create new SO from first FM.
logic somethig like this.
Amit. -
Is there a BAPI function module which reverses the sign of an integer
Hi Friends,
Could u plz tell me a BAPI function module which can reverse the
sign of an integer ?
For example:
if i get the integer value in work area as <number> <sign> , i need to change it to <sign><number>.
i.e if i get the integer value in work area as "248-" ("-" indicates minus sign) to " -248 ".
i.e if i get the sign after the value , my requirement is to get the sign before the value.
The actual ABAP query is:
data: QTY_1 TYPE CHAR10,
QTY_2 TYPE CHAR10,
WA_DISTK_PORTLET-QUANTITY TYPE INT4.
QTY_1 = WA_DISTK_PORTLET-QUANTITY.
SEARCH QTY_1 FOR '-'.
IF SY-SUBRC = 0 AND SY-FDPOS <> 0.
SPLIT QTY_1 AT '-' INTO QTY_1 QTY_2.
CONDENSE QTY_1.
CONCATENATE '-' QTY_1 INTO QTY_1.
CONDENSE QTY_1.
ELSE.
CONDENSE QTY_1.
ENDIF.
CLEAR: WA_DISTK_PORTLET-QUANTITY.
MOVE : QTY_1 TO WA_DISTK_PORTLET-QUANTITY.
when i move this QTY_1 to work area quantity field The sign is coming after the numeric value.
Note: There is no possibility to change the datatype of quantity field.
I have tried my level best with 'CLOI_PUT_SIGN_IN_FRONT' function module.
I will assign full points to the correct function module.Hi Ram,
try this ang look into fields.
data: fields type table of SVAL with header line.
fields-tabname = 'MARA'. fields-fieldname = 'MATNR'. append fields.
fields-tabname = 'BKPF'. fields-fieldname = 'BUDAT'. append fields.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
POPUP_TITLE = 'Value Insert'
TABLES
FIELDS = fields.
Regards, Dieter -
Function Module which will take Wekk No & Return date range (from & To dat)
Hello everyone,
I need a Function Module which will take Week No as an input Parameter & return me the date range
(From date & To date of that week) .
Thanks in advance!
Cheers!
Moderator message: date calculation questions = FAQ, please search before posting.
Edited by: Thomas Zloch on Nov 2, 2010 5:25 PMHi,
Please write the below logic..
data : v_date11 type sy-datum,
monday type sy-datum,
sunday type sy-datum,
v_count1 type i .
*v_count1 = 20 * 7. " Say U want details for 20th week , or give a parameter for week and multiply with 7*
v_date11 = '20100101'. " take the starting day of the year ....
v_date11 = v_date11 + v_count1. " add to the date
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE' <-- call this FM
EXPORTING
DATE = v_date11
IMPORTING
WEEK = WEEK
MONDAY = MONDAY <-- will have the week starting day
SUNDAY = SUNDAY
Regards,
Srini. -
RFC enabled function module to insert , update and delete data in a ZTABLE
friends..
Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)?
if not how can we create it? plz give me the details steps..
what are the import, export parameters and how to code and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address. I need to develop a RFM which does the 3 tasks, insert update delete in the same RFM)
Thanks and Regardscreate a f.n mod in se37 and make it rfc enabled. ur import parameters are Emp_Id, Name, Address and TASK and u can have an export parameter like result which gives the status of the update. based on task u can insert using keyword INSERT....and update using UPDATE or MODIFY and delete using DELETE. these keyword are not compelte with syntax but need to refer the SAP documentation.
-
Creating Includes for Function Modules
Hi Experts,
Can you please let me know how to create includes for function modules.
I came across this in a standard include program, which was generated by a function library. The includes inside this program where linked to the function modules (when I double clicked on them).
Please let me know how to create it.
Thanks in advance !
Regards,
Anand Patil.Hi,
have a look at the code for better understanding
Declaration of Workareas *
DATA: lwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create,
lwa_data TYPE edidd, " Work area for IDOC
lwa_control TYPE edidc. " Work Area for control rec
Read the control data information of idoc.
loop at idoc_contrl INTO lwa_control Where mestyp = lc_mbgmcr.
Extract the data from the segments.
LOOP AT idoc_data INTO lwa_data
WHERE docnum = lwa_control-docnum and
segnam = lc_item_create.
*->> Set the tabix of the internal table
lv_index = sy-tabix.
Move the Material Document Item Segment data
MOVE lwa_data-sdata TO lwa_e1bp2017_gm_item_create.
Modify the material document item data internal table
PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create.
*->> set the changed values to the IDOC SDATA
MOVE lwa_e1bp2017_gm_item_create TO lwa_data-sdata.
*->> Modify the table
MODIFY idoc_data FROM lwa_data index lv_index.
Clear the Work areas
CLEAR : lwa_data,
lwa_e1bp2017_gm_item_create.
ENDLOOP. "LOOP AT t_idoc_data
Call the BAPI function module to create the
appropriate Material Document
CALL FUNCTION 'BAPI_IDOC_INPUT1'
EXPORTING
input_method = input_method
mass_processing = mass_processing
IMPORTING
workflow_result = workflow_result
application_variable = application_variable
in_update_task = in_update_task
call_transaction_done = call_transaction_done
TABLES
idoc_contrl = idoc_contrl
idoc_data = idoc_data
idoc_status = idoc_status
return_variables = return_variables
serialization_info = serialization_info
EXCEPTIONS
wrong_function_called = 1
OTHERS = 2.
IF sy-subrc = 1.
RAISE wrong_function_called.
ENDIF.
endloop.
ENDFUNCTION.
here when we write the statment
PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create and double click on sub_modify_idocdata .
it will create a include with the name "LZDTSINT052F_GPOMS_GMF01 ".
now we can write the FORM ..END FORM In this inculde.like this.
***INCLUDE LZDTSINT052F_GPOMS_GMF01 .
*& Form sub_modify_idocdata
Modify the material document item data internal table
FORM sub_modify_idocdata
CHANGING pwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create.
contant declaration
CONSTANTS: lc_261(3) TYPE c VALUE '261'.
DATA : lv_aplzl LIKE resb-aplzl,
lv_aufpl LIKE resb-aufpl,
lv_subrc LIKE sy-subrc,
lv_charg LIKE resb-charg,
lv_uom LIKE pwa_e1bp2017_gm_item_create-entry_uom.
CLEAR: pwa_e1bp2017_gm_item_create-reserv_no,
pwa_e1bp2017_gm_item_create-res_item.
*->> Get SAP storage bin & Storage type from the Z table
SELECT lgtyp lgpla
INTO (pwa_e1bp2017_gm_item_create-stge_type,
pwa_e1bp2017_gm_item_create-stge_bin)
UP TO 1 ROWS
FROM zdtsint050_sttyp
WHERE zstorage_typ = pwa_e1bp2017_gm_item_create-stge_type
AND zstorage_bin = pwa_e1bp2017_gm_item_create-stge_bin.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR: pwa_e1bp2017_gm_item_create-stge_type,
pwa_e1bp2017_gm_item_create-stge_bin.
ENDIF.
PERFORM get_oper CHANGING pwa_e1bp2017_gm_item_create.
Get the Reservation number and Reservation item number
basing on the idoc data.
SELECT rspos werks lgort
INTO (pwa_e1bp2017_gm_item_create-res_item,
pwa_e1bp2017_gm_item_create-plant,
pwa_e1bp2017_gm_item_create-stge_loc)
FROM resb
UP TO 1 ROWS
WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
AND matnr = pwa_e1bp2017_gm_item_create-material
AND charg = pwa_e1bp2017_gm_item_create-batch
AND aufnr = pwa_e1bp2017_gm_item_create-orderid
AND vornr = pwa_e1bp2017_gm_item_create-activity
AND bwart = lc_261.
ENDSELECT.
IF sy-subrc <> 0.
Start of insertion for R31K993797
CLEAR lv_charg.
SELECT rspos werks lgort
INTO (pwa_e1bp2017_gm_item_create-res_item,
pwa_e1bp2017_gm_item_create-plant,
pwa_e1bp2017_gm_item_create-stge_loc)
FROM resb
UP TO 1 ROWS
WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
AND matnr = pwa_e1bp2017_gm_item_create-material
AND charg = lv_charg
AND aufnr = pwa_e1bp2017_gm_item_create-orderid
AND vornr = pwa_e1bp2017_gm_item_create-activity
AND ( splkz = 'X' or
splkz = space )
AND bwart = lc_261.
ENDSELECT.
IF sy-subrc <> 0.
End of insertion for R31K993797
SELECT SINGLE werks lgort
INTO (pwa_e1bp2017_gm_item_create-plant,
pwa_e1bp2017_gm_item_create-stge_loc)
FROM resb
WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no.
CLEAR : pwa_e1bp2017_gm_item_create-reserv_no,
pwa_e1bp2017_gm_item_create-res_item.
ENDIF.
ENDIF.
get SAP UOM
SELECT SINGLE zsap_uom
INTO lv_uom
FROM zca_uom_conv
WHERE zext_uom = pwa_e1bp2017_gm_item_create-entry_uom.
IF sy-subrc = 0.
pwa_e1bp2017_gm_item_create-entry_uom = lv_uom.
ENDIF.
ENDFORM. " sub_modify_idocdata
*& Form get_oper
Get the operation
<--P_PWA_E1BP2017_GM_ITEM_CREATE_RE Segment
FORM get_oper CHANGING p_pwa_e1bp2017_gm_item_create TYPE
e1bp2017_gm_item_create.
DATA : l_aufpl LIKE afko-aufpl,
l_aplzl LIKE afvc-aplzl.
REFRESH : i_op.
UNPACK p_pwa_e1bp2017_gm_item_create-orderid TO
p_pwa_e1bp2017_gm_item_create-orderid.
Get the reservation and routing number for the order
SELECT SINGLE
rsnum
aufpl
FROM afko
INTO (p_pwa_e1bp2017_gm_item_create-reserv_no,
l_aufpl)
WHERE aufnr = p_pwa_e1bp2017_gm_item_create-orderid.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_NUMCV_INPUT'
EXPORTING
input = p_pwa_e1bp2017_gm_item_create-activity
IMPORTING
output = p_pwa_e1bp2017_gm_item_create-activity.
ENDIF.
ENDFORM. " get_oper
Regards,
nagaraj -
How to log input parameters for Function Modules?
Hi,
I need to create a Logging system to trace input parameters for function modules.
The log functionality could be done by developing a class method or a function module (For example 'write_log'), and calling it within each function module that I want to log. The 'write_log' code should be independent from the interface of the Function Module that I want to log.
For example, I'd like to write a function/class method that can log both these functions modules:
Function DummyA
Input parameters: A1 type char10, A2 type char10.
Function DummyB
Input parameters: B1 type char20, B2 type char20, B3 type char20, B4 type Z_MYSTRUCTURE
Now the questions...
- Is there a "standard SAP" function that provide this functionality?
- If not, is there a system variable in which I can access runtime all parameters name, type and value for a particular function module?
- If not, how can I loop at Input parameters in a way that is independent from the function module interface?
Thank you in advance for helping!check this sample code. here i am capturing only parameters (import) values. you can extend this to capture tables, changin, etc.
FUNCTION y_test_fm.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(PARAM1) TYPE CHAR10
*" REFERENCE(PARAM2) TYPE CHAR10
*" REFERENCE(PARAM3) TYPE CHAR10
DATA: ep TYPE STANDARD TABLE OF rsexp ,
ip TYPE STANDARD TABLE OF rsimp ,
tp TYPE STANDARD TABLE OF rstbl ,
el TYPE STANDARD TABLE OF rsexc ,
vals TYPE tihttpnvp ,
wa_vals TYPE ihttpnvp ,
wa_ip TYPE rsimp .
FIELD-SYMBOLS: <temp> TYPE ANY .
CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
EXPORTING
funcname = 'Y_TEST_FM'
* INACTIVE_VERSION = ' '
* WITH_ENHANCEMENTS = 'X'
* IGNORE_SWITCHES = ' '
* IMPORTING
* GLOBAL_FLAG =
* REMOTE_CALL =
* UPDATE_TASK =
* EXCEPTION_CLASSES =
TABLES
exception_list = el
export_parameter = ep
import_parameter = ip
* CHANGING_PARAMETER =
tables_parameter = tp
* P_DOCU =
* ENHA_EXP_PARAMETER =
* ENHA_IMP_PARAMETER =
* ENHA_CHA_PARAMETER =
* ENHA_TBL_PARAMETER =
* ENHA_DOCU =
EXCEPTIONS
error_message = 1
function_not_found = 2
invalid_name = 3
OTHERS = 4
IF sy-subrc = 0.
LOOP AT ip INTO wa_ip .
MOVE: wa_ip-parameter TO wa_vals-name .
ASSIGN (wa_vals-name) TO <temp> .
IF <temp> IS ASSIGNED .
wa_vals-value = <temp> .
ENDIF .
APPEND wa_vals TO vals .
ENDLOOP .
ENDIF.
ENDFUNCTION. -
Is there any function module which gives open invoices &open amount?
Hello All,
I want to use function module which gives open invoices with open amount.
I know 'CUSTOMER_OPEN_ITEMS' 'BAPI_AR_ACC_GETOPENITEMS' function which gives open invoices but does not give open amount.
Can anyone help me to find such function?From this BAPI ,
BAPI_AR_ACC_GETOPENITEMS, You got amount for items in lc_amount field of lineitems table parameter.
I hope, it will helpful to you.
by
Prasad GVK. -
Formal error: Invalid calling sequence for function modules
Hi All,
I have developed a function module for FQEVENT 620 Payment: Transfer Line Items for Clearing.
The clearing works fine.
After clearing the open items i need to post an FI-CA Document(BAPI : BAPI_CTRACDOCUMENT_CREATE) for each open item(cleared item)
I have used the bapi : BAPI_CTRACDOCUMENT_CREATE in the same function module that i have developed for FQEVENT 620 Payment: Transfer Line Items for Clearing.Here i am getting an error "Formal error: Invalid calling sequence for function modules".
So please let me know where i can use this bapi to post fi-ca document.Is there a BAdi or Enhancement Spot where i can use this BAPI or tell me what should i do to overcome this error.
Regards
VenkatVenkat:
While I am confused about your business process - creating an open item when clearing one seems strange. Look into event 0020 which is called after documents are posted - it may present the opportunity to post process additional documents.
regards,
bill. -
hi,
I want a function module which could calculate the previous month's start date and end date...
Say todays date is like 29.05.2007(start date) it should return
01.04.2007 and 30.04.2007...
IS there any FM for this ... or how to go about this scenario ???
thanks in advance
sammSee the below Logic :
DATA :g_date(2) TYPE n, " Date
g_month(2) TYPE n, " Month
g_year(4) TYPE n , " Year
g_bill_low(10) TYPE n, " From date
g_bill_high(10) TYPE n, " To date
g_month1(2) TYPE n, " Month
g_year1(4) TYPE n, " Year
g_date1(2) TYPE n, " Date
g_year2(4) TYPE n, " Year
g_datum LIKE sy-datum. " System date
RANGES : r_bdate FOR vbrk-fkdat. " Billing date
g_datum = p_date + 10.
g_month = g_datum+4(2).
g_year = g_datum+0(4).
IF g_month = 1.
g_year = g_year - 1.
g_month = 12.
g_date = 1.
ELSE.
g_month = g_month - 1.
g_date = 1.
ENDIF.
Passing the date to billing date-low
CONCATENATE g_year g_month g_date INTO g_bill_low.
r_bdate-low = g_bill_low.
r_bdate-sign = 'I'.
r_bdate-option = 'BT'.
g_month1 = g_datum+4(2).
g_year1 = g_datum+0(4).
IF g_month1 = 1.
g_year1 = g_year1 - 1.
g_month1 = 12.
ELSE.
g_month1 = g_month1 - 1.
ENDIF.
CASE g_month1.
WHEN 1.g_date1 = '31'.
WHEN 3.g_date1 = '31'.
WHEN 4.g_date1 = '30'.
WHEN 5.g_date1 = '31'.
WHEN 6.g_date1 = '30'.
WHEN 7.g_date1 = '31'.
WHEN 8.g_date1 = '31'.
WHEN 9.g_date1 = '30'.
WHEN 10.g_date1 = '31'.
WHEN 11.g_date1 = '30'.
WHEN 12.g_date1 = '31'.
ENDCASE.
g_year2 = g_year1.
IF g_month1 = 2.
g_year2 = g_year2 MOD 4 .
IF g_year2 = 0.
g_date1 = 29.
ELSE.
g_date1 = 28.
ENDIF.
ENDIF.
Passing the date to billing date-high
CONCATENATE g_year1 g_month1 g_date1 INTO g_bill_high.
r_bdate-high = g_bill_high.
APPEND r_bdate.
Reward Points if it is helpful
Thanks
Seshu -
Transport of ALE Interfaces for Function Module
hi,
i have a Z function module, Z business object type and z message type identifying ALE interface.
i need to move all the objects from Dev R3 to QA R3. What are the steps involved?
Thanks,
TirumalHi
While creating a Z function module it will ask you for a change request number. attach it to change request and migrate it to Production.
In case your function group to which you assigned this function module is open then the CTS number will by default come in CTS number field if any exists for the function group. You can now migrate your CTS to production.
Now after assinging function module to a CTS you can be sure that your program for function module and FM both will be migrated. For confirmation you can now check attribuutes section in your function module. it will list the SAP program associated with Func mod , function group to which function module is assigned , package and include programs which needs to be migrated. So you only need to attach a CTS and migrate your CTS.
You can create a Change erquest (CTS) in SE01 or SE10 transactions.
Regards,
Amit.
Please reward any help
Message was edited by: amit bhadauria
Message was edited by: amit bhadauria -
Function module which convert number to days to date
Hi,
Any one knows any function module which convert total number of days into date.
thnaks,
shilpa kHi,
FIMA_DAYS_AND_MONTHS_AND_YEARS
FI_PSO_DAYS_MONTHS_YEARS_GET
RSSM_CONVERT_DAYSEC2TIMESTAMP
RSSM_CONVERT_TIMESTAMP2DAYSEC
Function Modules related to Date and Time Calculations
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
Regards
Maybe you are looking for
-
I have and Ipod touch 3G and it has a message in Red saying "Ipod is disabled for 16,333 minutes" I did not have it backed up to a computer and it has 122 books on tape installed on it so I don't want to erase the whole thing and start trying to down
-
PDF Form Requires a newer version of Adobe Reader
New at this...Created my form in Live Cycle 8.0/Professional 8. Throughout company we are using Acrobat Reader 7.0 and are not at this time looking to upgrade. When our users open this form, get "This PDF form requires a newer version of Adobe Reader
-
Why i can't use iCloud tabs on my iPhone 4 ?
Why I can't use iCloud tabs on my iPhone 4 ? I've surfed in internet With my iPod Touch 4g (ios 6) but i can't find the web pages in iCloud tabs of my iPhone 4. Please help me !
-
LaserJet 2605dn washed out colors with new color cartridges
I loaded the 3 new color cartridges, the black still has ink. Now when I print, the colors are washed out . I calibrated color and ran the cleaning utility. Strangely, the demo print page with the bright blue and orange looks just fine. I investi
-
OK. Downloaded FCE and LiveType. Now... 1. If my finished product will go via iMovie and iDVD do I have to use PAL settings in LiveType or will iDVD PAL setting be sufficient? (Time constraints prevent me from using FCE just right now). 2. I imported