Reg:Howto create checkboxes in function module(bapi)
Hai ALl
I have one senario .in i need to create check boxes in functionmodule . for that i have to write the code.
could any body suggest me.
how to do this senario in FM
thanks and regards,
Chaitanya
Use data Element : GLX_XFELD ( General Checkbox ) for checkbox..
For check box... if box is checked then value is 'X' else
space.
but in function module it doesn;t matter whether u use data element for checkbox... u can use char type variable of length 1.
and inside code u can check..
v_char1 = 'X'. : it means checkbox is checked.
v_char1 = space " it means checkbox not checked.
Reward if useful
regards
Prax
Similar Messages
-
Reg : I need help on function module/BAPI
Hi Guru's,
I want to pass plant address number in BAPI "BAPI_PO_CREATE1" but i found that to pass address number for vendor..
Please guide me to pass plant address field in purchase creation bapi..
Regards
P.Senthil KumarHi Senthil,
Check this link,
Re: BAPI_PO_CREATE1 -
How to create Billing Plan in sales order using Function module /BAPI
hi,
How to create Billing Plan in sales order using Function module /BAPI
i hv check few FM such
BILLING_SCHEDULE_READ
BILLING_SCHEDULE_GET_NUMBER
BILLING_SCHEDULE_SAVE
But unable to create billing plan for a sales order.....any other method to create???Hi,
Use this link.
Create sales order with billing plan via LSMW and BAPI BUS2032
BAPI or Function to update Billing Plan in Sales Order Items
Hope this will help you.
Regards,
Vijay -
Function Module / BAPI for Creating Material freight Group
Hi All,
Can anyone tell me the Function Module / Bapi for creating material freight group.
Regards,
Raj.Bapi for creating material freight group. :: You actually use mm01 or mm02 to change data for material flight.
So you can use BAPI for mm02 and mm01
For Ex:
BAPI_MATERIAL_SAVEDATA
Hope this helps -
Significance of pass value checkbox in function module
Hi all,
Here is a confusion.....While creating a custom function module,i have checked the update module or RFC call radio button going to its attributes.But in the importing parameter if i pass a structure,it is giving a syntax error.It is only allowing table parameter.But if i check the pass value checkbox,it is not givng any syntax error if i pass any structure in the importing parameter.Can anybody please explain me the significance of pass value checkbox?
Thanks in advance.......Hi,
Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
Function Module Interfaces
The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
Syntax
... [IMPORTING parameters]
[EXPORTING parameters]
[CHANGING parameters]
[TABLES table_parameters]
[{RAISING|EXCEPTIONS} exc1 exc2 ...]
The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
Interface parameters
The interface parameters are defined on the relevant tab pages in the Function Builder.
IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for <b>'pass by value'</b> is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
Exceptions
The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
Note
For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
RFC is a technology which is used to access a functions (Modules) from
the remote systems.
If a function module is set as remote enabled which can be access from
the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
But Normal function modules can not accessd from the remote system.
Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
CALLING A FUNCTION MODULE:
1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
--> Write the Corresponding FM name --> Hit Enter
2)The appropriate import ,export Parameters will be displayed in ur editor
3)Pass the Values Here.
Also check these links.
http://www.geocities.com/victorav15/sapr3/abapfun.html
Check this link:
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
Check this link:
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
See the following links:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
Regards,
Srilatha. -
How to create webservice from function module
Hello,
I'm trying to create webservice from function module from. I choose Utilities/More Utilities/Create Webservice/..From function Module. What data should I enter in section "Enter Package/Request" ?
When I check "Local object" checkbox I get a message "Test objects cannot be created in foreign namespaces"
Is there any doc about this procedure (web service creation) with description of all sections ?
thanks for any reply,
Lukasz FerencHi,
Which SAP product of wich release of which SP are you using ?
The procedure is documented in help.sap.com and in blogs and SDN forum messages.
It means that the use of the SEARCH button should give plenty of answers...
>When I check "Local object" checkbox I get a message "Test objects cannot be created in foreign >namespaces"
As usual, begin your choosen name with an "Z".
Regards,
Olivier -
How to create the INBOUND Function Module for INBOUND IDOCs
Hi Friends,
Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
which are recieved from XI Server ?
I am working in SAP-ISU
Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
We have a Standard INBOUND FUNCTION MODULE
IDOC_INPUT_ISU_MR_UPLOAD
which Uploads the Meter Reading Results.
I copied the Same function Module into ZIDOC_INPUT_
and working on it.
Can any one suggest me, whether i am going in correct way or not.
In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
Can I Use the Same BAPI
BAPI_MTRREADDOC_UPLOAD
to Update the below fields,
EABL-SERNR
EABL-ZWNUMMER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS
EABL-ADATTATS
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Kindly Suggest me,
Thanks in Advance,
GaneshHello Ganesh
I think you are going completely astray with you z-function module for IDoc processing.
If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
EABL-SERNR => BAPIEABLU-SERIALNO
EABL-ZWNUMMER =>REGISTER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS => ACTUALMRTIME
EABL-ADATTATS => ACTUALMRDATE
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
- BAPI_TE_EABL
- BAPI_TE_EOSB
Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
Regards
Uwe -
Function module/BAPI for Pgi creation
hi all,
any standard function module/ BAPI for create PGI.
i know BAPI_OUTB_DELIVERY_CONFIRM_DEC, suppose if we are using PGI reverse not possibul.
regardsThis is not answered
-
How to find Exits in Function Module & BAPI
Hi,
How to find exits in Function Module & BAPI.
Thanks In advanceHi,
i ve a standard FM IDOC_INPUT_SALESORDER_CREATEFR which creates sales order using BAPI (inbound process).
Now my requirement is to check for some custom segment field if its not initial i ve to change item category field in line item for sales order.
could u pls help me in this.
Thanks in advance. -
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 create a new function module?
I was doing the tutorial to create a SAP data widget and the tutorial was using BAPI_FLIGHT_GETLIST to display the data. However, in my system, theres no data in the table SFLIGHT2 and i couldnt populate any data in it.
So i am trying to create my own function module. Can anyone tell me how should i go about doing it?Hi Low Soon ,
please check the below links for creating a new function module.
SAP Help :
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm
Step by Sterp approach to create a Functional Module:
http://www.****************/Tutorials/ABAP/FunctionModule/page1.htm
Thanks
Jaideep Srinivasan -
How to create a callback function module
Hi all,
I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
looks like i am going in wrong way ... can any one please help ??Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
Take care,
Stephen -
How to create a Z Function Module
Hi,
I am trying to create a Z function module in BI 7.0 that i can use in Transformations.
SE37> Name of FM.Create..>
It is prompting me to enter Function Group.
What is Function Group and How can i create a new function group (Detail Steps please)
and steps involved in creating a Function Module in BI 7.0
Thanks in AdvanceHi,
Function Group is just like a folder under which we can store n no. of function modules for organizational purpose. If u want any global declarations we will declare at function Group Level.
It is mandatory to save a function module under one function group. Select Goto menu item, select Function Group, then select, create function group in SE37. Just give the technical name and description and save.
Hope this helps u..
Regards
Ramakrishna Kamurthy -
How to create a custom function module with the records in SAP R/3?
Hi All,
How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
Regards
SaraHi
goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
Look at the below SAP HELP links, These links will show you the way to create a Function Module
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm -
Function module/BAPI to release a Business partner in GTS
Dear experts,
I have a requirement where in I need to release business partners programmatically. I request you to let me know if any function modules/BAPIs or any other method is available (except BDC).
I know the manual process of releasing them, and we were restricted to use BDC.
Thanks in advance.
Best Regards,
VishalHello Vishal,
Currently the release logic is inside subroutine instead of FM or BAPI.
You could refer to:
Report : /SAPSLL/LCON_BLOCKED_BPF01
Form : deblock_partner_masters
Best regards,
Vincent
Maybe you are looking for
-
HT1766 i cant figure out how to transfer an ap from i tunes to my ipod touch
i tried everything i can think of and cant get it to synch the flixster app
-
PowerPC G5 & ATI X800 XT: boot troubles
After 2 months of good regular working of an ATI X800 XT Mac Edition video board on my dual 1.8 G5 PowerMac, my Mac began starting up in Open Firmware mode; moreover, waking up from stop mode it suddenly shuts down. Exiting or booting from open firmw
-
Lenovo 3000 G530 Gprahics Driver problem
i baught a new new laptop lenovo 3000 G530 with intel x4500mhd installed vista ultimate x64 and donwloaded intel gma driver from lenovo support site... but when i go for install it says " This Computer Does Not Meet the minimum requirements to instla
-
(OFF TOPIC) -Mac Snow Leopard - Eject CD disk?
Thought I'd ask around here as somone has most probably had this issue in the past. I've just started using a Mac with Snow Leopard on it. When I burn a CD the CD burns ok but the disk icon disappears from the desktop once the process of burning is o
-
Cropping and choosing sizes Aperture 2.0
I use the hot keep "C" to pull up the crop tool, is there a hot key to switch the ratio from 3 x 2 to 2 x 3? Also, My settings show "Constrain to Master Aspect Ratio" and appears width 3 and height 2 Is there a way to set default to 2 x 3?