Need to create a validation Function Module
Hi,
I need to create a Validation Function Module.
I have a ITAB into which data comes.
FIELD-SYMBOLS : <ITAB> TYPE ANY ,
key TYPE ANY,
char TYPE ANY.
<ITAB> = local_file.
there is a field KEY whose sum when becomes equal to 10.000 for every CHAR,system should show a popup in the below FM
CALL FUNCTION 'POPUP_WITH_WARNING_ALV'
EXPORTING
TEXTLINE1 = LT_POPUPTEXT
TEXTLINE2 = ' '
TITEL = 'Warnung'
Please let me know if the requirement is not clear.
Thank U very Much.
Hi annapurna ,
In your case even the KEY value is the most useful one right,
If so go about this way,
have another field flag set it when the sum of the KEY values exceeds 10.
Loop in an internla table.
Now the internal table will have all the data including the flag and now based on the flag (whether set or not) call the function module popup which should retrieve those matnr field where flag is set.
Display the error message saying that the KEY value fr this matnr exceeds 10.
Revert for further clarification.
Thanks and Regards
Srikanth.P
Similar Messages
-
Need help for IDOC inbound function module !
Hi guys please help me to create a IDOC inbound function module.
What are the parameters and tables.
How to write the code.
What it does.
Please send me one inbound func module code if possuble
ThanksHi,
You need to create an inbound function module. Then define the process code in transaction we42 and attach the function module to this process code.
In the function module you create you need to define tables of types EDIDC (Control record (IDoc)), EDIDD (Data record (IDoc)) and BDIDOCSTAT (ALE IDoc status (subset of all IDoc status fields)).
Regards,
Soumya. -
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 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 -
Error : J_2IRG1BAL, Create data processing Function module
Sap Experts,
when i go to se11 in which have given table name: J_2IRG1BAL, than i gone menu bar click on utilities select the table contents
click on create entries button.
1) Error Message : Create data processing function module
2) This table Relevant to RG1 Updation
3) Due to this error I am not able to upload the opening stock of finished material manuaaly
4) What are the actions need to be done to rectify the above error.
Regards,
PrabhakarHi
Ask your ABAPER to create the maintainence view of the table
regards
Sanil Bhandari -
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 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 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 -
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 -
Need to know the standard function module/program in E recruitment
Hi All,
I need to know the standard function module/programm that defaults the 'Functional area' field in the posting page from the requisition page.
Early responce is greatly appreciated.
Thanks and best regards
RajeevHi Masa,
Thanks for your reply.
We are using Assets with the integration of Project systems. We are now in 4.6C R/3 & SRM 5.0 system. And now R/3 upgrade and SRM upgrade going on smultaniously to ECC6.0 and SRM 7.0 respectively.
I would like to know any new functionality available in the latest upgrades and we have done lot of customization for Asset Procurement. And would like to go with Vanilla.
Can you please provide me some inputs about the Project (WBS element ) based Asset Procurement in SRM as standard.
Thanks and Regards,
Ramesh -
Need to know the standard function module in E-Recruitment
Hi All,
I need to know the standard function module that defaults the value of 'Functional area' in 'Posting' from 'Requisition'.
Early response is greatly appreciated.
Thanks an best regards
RajeevHi Masa,
Thanks for your reply.
We are using Assets with the integration of Project systems. We are now in 4.6C R/3 & SRM 5.0 system. And now R/3 upgrade and SRM upgrade going on smultaniously to ECC6.0 and SRM 7.0 respectively.
I would like to know any new functionality available in the latest upgrades and we have done lot of customization for Asset Procurement. And would like to go with Vanilla.
Can you please provide me some inputs about the Project (WBS element ) based Asset Procurement in SRM as standard.
Thanks and Regards,
Ramesh -
How to create EXCEPTION in function module
hi experts,
how to create exeptions in function module i want step by step.
regards,
chaituhi,
Raising Exceptions
There are two ABAP statements for raising exceptions. They can only be used in function modules:
RAISE except.
und
MESSAGE.....RAISING except.
The effect of these statements depends on whether the calling program handles the exception or not. The calling program handles an exception If the name of the except exception or OTHERS is specified after the EXCEPTION option of the CALL FUNCTION statement.
If the calling program does not handle the exception
· The RAISEstatement terminates the program and switches to debugging mode.
· The MESSAGE..... RAISING statement displays the specified message. Processing is continued in relation to the message type.
If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE..... RAISING statement does not display a message. Instead, it fills the system fields sy-msgid, sy-msgty, sy-msgno , and SY-MSGV1 to SY-MSGV4.
Source Code of READ_SPFLI_INTO_TABLE
The entire source code of READ_SPFLI_INTO_TABLE looks like this:
FUNCTION read_spfli_into_table.
""Local Interface:
*" IMPORTING
*" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
*" EXPORTING
*" VALUE(ITAB) TYPE SPFLI_TAB
*" EXCEPTIONS
*" NOT_FOUND
SELECT * FROM spfli INTO TABLE itab WHERE carrid = id.
IF sy-subrc NE 0.
MESSAGE e007(at) RAISING not_found.
ENDIF.
ENDFUNCTION.
The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table spfli_tab. If it cannot find any entries, the exception NOT_FOUND is triggered with MESSAGE ... RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
Calling READ_SPFLI_INTO_TABLE
The following program calls the function module READ_SPFLI_INTO_TABLE:
REPORT demo_mod_tech_fb_read_spfli.
PARAMETERS carrier TYPE s_carr_id.
DATA: jtab TYPE spfli_tab,
wa LIKE LINE OF jtab.
CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
EXPORTING
id = carrier
IMPORTING
itab = jtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
CASE sy-subrc.
WHEN 1.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
WHEN 2.
MESSAGE e702(at).
ENDCASE.
LOOP AT jtab INTO wa.
WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
ENDLOOP.
The actual parameters carrier and jtab have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
Hope this is helps,Do reward. -
URGENT : Error: Please create data processing function module
Hi
I am getting the folloiwng error
"Please create data processing function module" in table maintainence.
It is working fine in dev environment but not in QA and production.
Pleae help.
Regards
KalpeshHi Kalpesh,
I see it is something to do with the naming convention used in the quality and production system. These must have been setup differently compared to ur development system. So check with different naming conventions.
Reward points if helpful.
Cheers
Shafiq -
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 IDOC from Function module or RFC
Hi all,
I have tested one inbound IDOC for Time Upload to CAT2 using basic type "CATS_INSERT01" in WE19 through function module BAPI_IDOC_INPUT1 .It works well.
Now i need to create this IDOC once the sale order gets created thru BAPI.
For creation of Sale order i wrote one RFC in which i will call the Standard Sale Order Bapi.My question is once the Sale order gets created in that RFC How do i trigger the IDOC for CATS upload.Hi,
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
Maybe you are looking for
-
Battery problem while recording videos.
I got my ipod touch 5 1 month ago. I got a problem while recording videos. The battery was around 40 percent, but after I recorded a video for about 1-2 minutes. The 20% was popup, then it turned off automatically. While I turn on it, the battery wil
-
External HD projector DVI / Thunderbolt / HDMI ?
Hi I have two MBPs , one vs10.5 and a recently bought one with vs 10.9 installed. I do Video movies in HD 1920 x 1080, which I project on a large screen using an HD 1920 x 1080 projector. With my 10.5, I connect it to the projector using a DVI to HDM
-
Rapid Restore Ultra don't resize partition on new HDD
Hi, first as a new member,i send many thanks for both Lenovo community and Thinkpad.com Forum members for their great help in the thinkpad users world..... Following one of the very good advices of Ajikula,i bought a new Samsung HM160HC IDE HDD to up
-
Installing Snow Leopard on "clean" Mac
Hey. I'm new to mac, I bought my Macbook Pro in late Aug 2009. I have the "normal" Leopard witch was installed when I bought the mac. I have been using PC for 15 yrs soo I'm not really familiar to how thing works in Mac so I hope someone out there ca
-
HT1918 i need to find out my passwords
I need to find out the answers to my security questions