Customized function Module BOM Problems
Hi,
i have created New function Module as copy of of
IDOC_INPUT_BOMMAT .
now i need to do some customizations in the new function module
like
1.calculating validity dates by using function module
CC_CHANGE_NUMBER_READ
This is required for:
Valid from date Change Ref - ZE1CHNGNR-ZCHFROM
Valid to date Change Ref - ZE1CHNGNR-ZCHTO
Current Year Change Ref - ZE1CHNGNR-ZCHCURR a new customized extended segment
How to do this
Please help me
In function module "IDOC_INPUT_BOMMAT" there is a subroutine
move and convert data from idoc to application internal tables
perform idoc_to_bom_itabs tables idoc_data
idoc_contrl.
that transfers all the data in IDOC to internal tables.I think after this you have to write your code and modify BOM internal tables in the program. you can find all the BOM internal tables in the include "LCSDSTOP". I have never done this. Please try and see whether this will work for you.
Thanks.
Similar Messages
-
Inconsistent Errors when processing IDocs using custom Function Module
I am encountering a most perplexing error. Here is the situation.
We have a custom function module to update data in the EH&S system. We are having a bizarre error occurring. This is the basic processing of the function module:
1. IDoc data is read and loaded into an internal table.
2. Data is run through a series of checks to determine if the data is valid for entry into the system.
3. After validation we use function module C1F2_SUBSTANCES_READ_WITH_REF to read characteristic data for the substance. This data is used to validate whether current data exists to allow for loading of the IDoc data. (This is the step where the IDoc is receiving an error even if the data is valid. This only occurs if we are processing a large amount of Idocs and one IDoc contains valid data and another invalid data for the same substance. It occurs even if the Idocs are not processed in sequence. If individually processed or reprocessed after initial failure they pass. This is what is so confusing!) If it exists, a flag is set and the data is loaded using function module BAPI_BUS1077_CHANGE to modify the data.
4. If the flag is set to allow further processing, the function module C1F2_SUBSTANCES_READ_WITH_REF is used again to select different characteristic data for the substance. A similar validation process occurs and if it passes, data is loaded using BAPI_BUS1077_CHANGE to update and BAPI_BUS1077_CREATE to create new data.
Here is the situation:
When processing one valid record for one substance, the record loads successfully. When processing multiple valid records (all are valid) for one substance, they all load successfully. The problem occurs when attempting to load valid and invalid records for the same substance. Some times the program successfully loads the valid data (as expected). Other times, it will not load any records. It is not consistent!
The order of IDoc processing does not have an impact on the success of the load. Whether the valid or invalid record processes first does not have an impact on the success of the valid substance load.
Does anyone have ANY Idea of what is going on? I am clearing all fields in the function module before processing occurs. I cannot find what is causing the error to occur.
HELP!
Jim HardyI have some further information. It seems that if data for a substance is sent in two separate Idocs, one with valid and one with invalid data, As long as the two IDocs are processed consecutively, they process correctly. If they are separated by IDocs containing other substance information, they fail.
thanks
Jim -
Error in Custom Function Module
Hi,
I am working on implementing General Ledger Business content in financial Accounting.
We had a requirement of creating a Custom Virtual cube similar to 0FIGL_V10. Hence, we had copied the standard function module RS_BCT_FIGL_DATA_GET_VC10 and created a custom function module. Before doing that, we had copied the function group RS_BCT_FIGL and created a custom function group for the custom function module.Both were activated subsequently. Then, we had created a custom virtual cube (ZFIGL_V10) using the custom function module.
The queries on the Standard virtual cube were migrated to ZFIGL_V10 using the RSZC transaction code. when the queries are executed in RSRT, we get an error message "**An exception with the type CX_SY_DYN_CALL_ILLEGAL_FUNC occurred" and the ABAP debugger is started post that error.
Has anyone faced this problem before?could any of you provide some pointers to it.
Regards,
SainathYou cannot use the standard function module which is used for standard cube for another cube.
You should not change the function module.
Instead you can make a copy of the function module you are using aand use this copy in ur virtual cube which will work in the same way the actual Fm used to work and it will make you perfrom the changes.
Follow the below steps:
1) Goto SE37 and In the top tool bar click on the copy button which is on right side of delete button.
2) in fr FM give the name of the actual FM and in to Fm give the name of the function module you want to copy.
3) Then click on copy.
4) Now open this new function in edit mode and goto the import/export parameters and check. it will have all the same parameters as the actual FM. Here you can make the changes you want.
5) Now use this FM in your virtual cube and it will be working as per your requirement
https://forums.sdn.sap.com/click.jspa?searchID=9605118&messageID=4999763
Hope it Helps
Chetan
@CP.. -
ALE custom function module for IDOC_INPUT_COSTCENTER
We are setting up an ALE to update cost centers in our HCM system from our ECC system. In conjunction with the cost center update I need to convert the company code (it's not straight-forward enough to use a conversion rule) so I have created a custom copy of IDOC_INPUT_COSTCENTER and included my conversion logic there.
I have done all of the necessary configuration steps associated with the custom function module; created message type ZCOSMAS, process code ZCOSM, etc. When I execute BD16 it is passing the correct message type and process code to the HCM system but I am getting a status 51 'Function module not allowed: IDOC_INPUT_COSTCENTER'.
I must be missing some piece of configuration in my HCM system that should trigger Z_IDOC_INPUT_COSTCENTER rather than IDOC_INPUT_COSTCENTER. Can anyone tell me what I have missed?
Thanks in advance for any assistance you can provide.
Regards,
Pat
Edited by: Patricia Holland on Dec 22, 2011 2:38 PMI thought that I had found found my problem in the model view but I was mistaken. I am still getting status 51 'Function module not allowed: IDOC_INPUT_COSTCENTER'.
It should be using Z_IDOC_INPUT_COSTCENTER.
Edited by: Patricia Holland on Dec 22, 2011 3:00 PM -
Run time error due to custom function module in a program
Hi,
I have created one program using custom function module ZIN_COMEV_CUSTDETAILNOTIF_OUT .The program is showing runtime error
"Incorrect parameter with CALL FUNCTION."
I have tested the FM using same set of parameter as in program it is working.It is throwing error while executing in program help.
Regards
DattaHello Nagraj or harish
I think you may be right.There is date field in my function module ,when I am testing function module I am giving it as
Y_DATE = 01.01.2011,but in program the field is DATS type and I have to give 20110101.If this is the problem how I can solve it.
CALL FUNCTION 'ZIN_COMEV_CUSTDETAILNOTIF_OUT'
EXPORTING
Y_SENDER = gv_g_sender
Y_RECEIVER = gv_g_reciever
Y_PARTNER = GV_V_PARTNER
Y_BASIC_PROCESS = GC_BASIC_PROCESS
Y_SWITCHNUM =
Y_SEN_LOAD =
Y_INTUI = GV_V_INTUI
Y_TRANSACTIONID =
Y_DATE = GV_V_DATE -
How to write the custom Function Module to trigger the Alert.
Hi all,
I have developed a custom alert category in Tx - alrtcatdef. Now i want to trigger it from my custom function module. what should i do or what is the procedure to trigger the alert from my custom function module.
Arul Jothihi arul,
try this program.
RSALERTTEST.
check out this link...
<a href="/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts:///people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
regs,
jaga -
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 -
How to bring the custom function module in WE42?
Hi,
I have created a custom function module to post a custom idoc.
Process code has been created thro WE42 and WE57 is done.
Still I am not able to see the custom function module in the list (WE42) in order to assign it to process code.
May i know the reason for this?
Thanks.
ThiyaguWhat makes you think that it should be visible in WE42? There is no F4-value help for this and you haven't added it manually yet, right.
In WE42 you can manually add entries, so that's what I would do. -
How to develope custom function modules in SAP R/3 system to maintain c...
How to develope custom function modules in SAP R/3 system to maintain cross
referencing tables for sales order number.Hi Raja,
Steps to crate FM..
Follow these steps..
Go to the T: code SE37
First You Create Function Group
On That u specify
Function Group Name..............
Short Text..............................
save...
Go to SE 37
Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
Short Text.......
Save...
Next Go to Attributes..
Select Radio button : Remote enabled model
Go to Parameters..
Click Import...
Give Parameter Type Associate type S.t
next Click Export...
Give Parameter Type Associate type S.t
Next Click Tables Button..
Specify tables..
Next click source code button..
Write Source code here..
Eg : Select statements Etc..
Finally we should be select the Radio button Enable remorely
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
Hope this information is useful to you..
Reward points if it is usefulll....
Thanks ,
Satya Kumar.. -
Export tables in custom function module
I am creating a custom function module and want to return a table of contacts i_contacts.
In the global data area I created a structure
TYPES: BEGIN OF t_contacts,
prsnr TYPE knvk-prsnr,
contactinfo TYPE adr6-smtp_addr,
END OF t_contacts.
And then in my interface I am trying to include as a table
i_contacts like t_contacts
But it keeps saying t_contacts not defined. Does that mean I have to define t_contacts as a global structure in SE11. Isnt there another way to define an internal table in the interface. Please advice.Hi..
Declare like this..
Data: i_contacts type standard table of t_contacts.
i_contacts like t_contacts does not work because t_contacts is not an internal table with header line.
Hope this helps.
regards,
chaithanya. -
Update the custom table by using Custom Function module.
Hi Experts,
My requirement is ,
1) To create the Custom Z table with fields
vbak-vbeln
likp-vbeln
vbuk-vbeln
After creating this Z table.
2) I have to create one custom function module.
Based on this function module i have to update that Z table.
3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
But I developed the ALV report with custom button and check box successfully.
My doubt is how to write the function module and based on that function module how to update the table.
Please suggest me on this requirement.
Thanks in Advance.
Thanks and Regards
Srihari.HI ,
Can any one help me out on my above requiremnet..
Thanks and Regards
Srihari. -
Export, Import and Table declaration in custom function module
I am creating a custom function module. Parameters needed are export internal table and one data field from the internal table.
What do i need to fill for 'associated type' for these export parameters since size of the internal table and type for the data field from the internal table vary.Hello Albert
If the function module need not be RFC-enabled then you have many ways to define such dynamic parameters, e.g.:
FUNCTION ZUS_SDN_DYNAMIC_PARAMS.
*"*"Local Interface:
*" EXPORTING
*" REFERENCE(ET_ITAB) TYPE TABLE
*" REFERENCE(ET_ITAB_1) TYPE ANY
*" REFERENCE(ET_ITAB_2)
*" REFERENCE(ED_DATA) TYPE CLIKE
*" REFERENCE(ED_DATA_1) TYPE ANY
*" REFERENCE(ED_DATA_2)
ENDFUNCTION.
See also: How to return back a structure of dynamic tables in a Function Module
Regards
Uwe -
Regarding custom Function Module
Hi Group,
Could anyone please guide me on a custom Function Module.
Scenario:
I have to use this function module to get either active records or inactive records.
This function module which has yet to be created should have to code to fetch both active records and inactive records. It depends on what user has selected in a report.
The report has 2 radio buttons in the selection screen. If rb_1 is selected then we have to call this function module and pass all the inactive records.
And if rb_2 is selected then all the active records should be selected.
Now I have to code the function module depending on the selection of the radio button. I can keep a flag in the function module and assign it 1 or 2 depending of the selection of the radio button.
Guys could you guide me on how do I set a flag in such scenario in the function module?
Like:
In the Source code of function module.
If flag = 1.
select all invalid records
endif.
If flag = 2.
select all valid records.
endif.
where should I keep this flag in my function module.
After setting this how do I call it in the report, depending on the radio button selected and how do I code in my report.
Hope you will understand this.
A million thanks in advance.
Kumar.hi,
in the function module u have to declare "FLAG" as an import parameter. n then while calling this functon module from the report, u should paas a value to this "FLAG" based on the radio button selected.
tell me if this information was helpful. -
Debugging customized function module when Idoc is triggered via ALE
Hi,
Whenever we save the billing document, an outbound idoc is triggered via ALE. The logic for the data to be included in the idoc is written in a customized function module.
However we are making some changes and would like to include some more data in the idoc. But we find that when we put a breakpoint in the function module, on saving the billing document, the flow does not stop at the break point. We are 100% sure that the code in the function module gets executed based on the data in the idoc.
How do we get into debug mode and break the flow in the function module so that we can debug in the function module?
Any help would be greatly appreciated.
Thanks in advance,
MickHi Mick, this might be of some help 4 u.
ALE IDOC
Sending System(Outbound ALE Process)
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Create Model View
Tcode BD82 - Generate partner Profiles & Create Ports
Tcode BD64 - Distribute the Model view
Message Type MATMAS
Tcode BD10 - Send Material Data
Tcode WE05 - Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 - Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Create Model View
Tcode BD82 - Generate partner Profiles & Create Ports
Tcode BD64 - Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 - Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 - Send Material Data
Tcode WE05 - Idoc List for watching any Errors
1)a Goto Tcode SALE
Click on Sending & Receiving Systems-->Select Logical Systems
Here Define Logical Systems---> Click on Execute Button
go for new entries
1) System Name : ERP000
Description : Sending System
2) System Name : ERP800
Description : Receiving System
press Enter & Save
it will ask Request
if you want new request create new Request orpress continue for transfering the objects
B) goto Tcode SALE
Select Assign Client to Logical Systems-->Execute
000--> Double click on this
Give the following Information
Client : ERP 000
City :
Logical System
Currency
Client role
Save this Data
Step 2) For RFC Creation
Goto Tcode SM59-->Select R/3 Connects
Click on Create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
give the information for required fields
RFC Destination : ERP800
Connection type: 3
Description
Target Host : ERP000
System No:000
lan : EN
Client : 800
User : Login User Name
Password:
save this & Test it & RemortLogin
3)
Goto Tcode BD64 -- click on Change mode button
click on create moduleview
short text : xxxxxxxxxxxxxx
Technical Neme : MODEL_ALV
save this & Press ok
select your just created modelview Name :'MODEL_ALV'.
goto add message type
Model Name : MODEL_ALV
sender : ERP000
Receiver : ERP800
Message type :MATMAS
save & Press Enter
4) Goto Tcode BD82
Give Model View : MODEL_ALV
Partner system : ERP800
execute this by press F8 Button
it will gives you sending system port No :A000000015(Like)
5) Goto Tcode BD64
seelct the modelview
goto >edit>modelview-->distribute
press ok & Press enter
6)goto Tcode : BD10 for Material sending
Material : mat_001
Message Type : MATMAS
Logical System : ERP800
and Execute
7)goto Tcode : BD11 for Material Receiving
Material : mat_001
Message Type : MATMAS
and Execute --> 1 request idoc created for message type Matmas
press enter
Here Master Idoc set for Messge type MATMAS-->press Enter
1 Communication Idoc generated for Message Type
this is your IDOC
Change Pointers
I know how to change the description of a material using ALE Change Pointers.
I will give the following few steps
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.
select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
ALE/IDOC Status Codes/Messages
01 Error --> Idoc Added
30 Error --> Idoc ready for dispatch(ALE Service)
then goto SE38 --> Execute the Program RBDMIDOC
29 Error --> ALE Service Layer
then goto SE38 --> Execute the Program RSEOUT00
03 Error --> Data Passed to Port ok
then goto SE38 --> Execute the Program RBDMOIND
12 Error --> Dispatch ok
Inbound Status Codes
50 Error --> It will go for ALE Service Layer
56 Error --> Idoc with Errors added
51 Error --> Application Document not posted
65 Error --> Error in ALE Service Layer
for 51 or 56 Errors do the following steps
goto WE19 > give the IDOC Number and Execute>
Press on Inbound function Module
for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
cheers,
Hema. -
How to trigger inbound custom function module?
Hello Experts,
Could someone help me with my dilemma?
I have created a custom process code which is linked to a custom function module for processing inbound IDocs. I have tested the function module successfully and I have set up the partner profile accordingly. The IDocs are coming in but get stuck at status "64". My function module never gets triggered even though in the partner profile it is set up to be triggered immediately. Any idea what I am missing?
Thanks,
MarlinHi marlin ,
just go for these checks and let us know the status ..
1.Check here .
Bd51 assignment of Inbound function module. Present or not
Check here .
2.Bd67 assignment of process code to inbound function module /present or not.
3.
Check here.
In the object for the message type u need to give the BUS object as the application object.
like bus2032
4.
Now place a break-point in ur function module and run it in debugging mode ..
Now check whether this one is getting into ur function module , next check the status record of the document number .
regards,
vijay.
take an idoc , populate it from we19 and then there call the function module in debugging mode in back ground ..
we'll see if this is actually picking the Fm or not.
Message was edited by: Vijay
Maybe you are looking for
-
Challenging:How can I COMBINE two CWIMAQPoints Collection in one - URGENT
I have two CWIMAQPoints collections and I want to combine them in one CWIMAQPoints in order to pass it as an argument to another function. In order to do this I would like to avoid using a loop in where I would add each item one-by-one. I would appre
-
How can i set a song as a ringtone on my ipod touch ?????
How can i set a song as a ringtone on my ipod touch
-
ATV Black Screen and Lack of Information in iTunes
I just bought this Apple TV from a 3rd party site. As soon as I got it I plugged in the power and HDMI cables. I turned on to the input and I was greeted with a black screen. Over the hours I've bought a second HDMI cable, learned how to reset the AT
-
No puedo reinstalar Acrobat X Pro de la CS 5.5 - Windows 7 HP
He reinstalado con éxito Photoshop ( con Bridge), pero no puedo reinstalar Adobe Acrobat X Pro. Me indica: "Ha habido problemas con su instalación","No se ha instalado".
-
Hello everyone I purchased adobe flash cs5.5 student version, It worked well initially, but few days ago I rececieved this error message when opening flash "this application has failed to start because amtlib.dll was not found. reinstall the applica