Code Injection Vulnerability in a BW function module???
Hi, I found OSS Not 1466530 regarding a Code Injection Vulnerability in a BW function module. But, this note is released only internally. Would anyone know anything about this?
No reply... No Answers...
Similar Messages
-
Code sample for using change document function modules
Can someone send me some sample code for using function modules CHANGEDOCUMENT_READ_HEADER and CHANGEDOCUMENT_READ_POSITIONS? I'm specifically looking for changes that occured to the standard price field in the material master (MBEW-STPRS) and I need to pull the most recent price change for a given material. I'm not sure how to write the code efficiently since I don't have a date to pass (again, since we're looking for the most recent change.)
Thanks!hi check this..
CHANGEDOCUMENT_READ_HEADERS
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
Check this link.
http://www.sap-img.com/mm001.htm
<REMOVED BY MODERATOR>
venkat.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:05 PM -
Modify code in include program of smartform function module
Hi,
Someone hardcoded breakpoint inside the smartform function code.
I have to delete that breakpoint.But its asking access key.
Can't we remove that line in any other way?.
Thanks,
SriHi,
You can remove it from the smartform instead of trying in the smartform include program.
Thanks
Arul -
Processing code and Function Module for IDOC
hi forum,
i m trying to make a file to IDOC scenario,
the IDOC is being sent to a R/3 system,
for the purpose, in R/3 i need to make a inbound processing code, can u tell me how to make a processing code and link it with a Function Module.......
can u guide me....sudheer,
If you are using standard idoc then you do not need to create new processing code.
There would be standard processing code available. You need to set input partner profile with processing code.
Let us know which idoc type you are using for inbound posting.
Anyway..TC for Creating processing code is : WE41(Outbound) and WE42 (Inbound)
Nilesh -
Function modules (and the like) for testing Object Dependencies in PLM
Hi all,
I've created an upload program for characteristic values to AUSP, but I need to <b>check the object dependencies</b> (as shown in transaction CU03) before saving the data.
I have the list of the dependencies for the characteristic in question, but how can I perform a dependency check in program code? Is there any <b>function modules</b> (and the like) which I can use?
All helpful answers will be rewarded!
- Mari VirikThanks!
I'm not that familiar with BAPIs, which transactions can I use to check it out? Transaction BAPI? And how do I locate it in the BAPI Explorer? How do I perform the method call?
More points will be rewarded
- Mari -
Function modules (and the like) for testing Object Dependencies
Hi all,
I've created an upload program for characteristic values to AUSP, but I need to <b>check the object dependencies</b> (as shown in transaction CU03) before saving the data.
I have the list of the dependencies for the characteristic in question, but how can I perform a dependency check in program code? Is there any <b>function modules</b> (and the like) which I can use?
All helpful answers will be rewarded!
- Mari VirikHi,
How did you solve this problem?
I have the same.
Thanks. -
How to write the exceptions in function module
dear all,
how to write the exceptions in function modules with example.
thanq
jyothiHi,
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.
Or
just have to decide what exceptions u want and under what conditions.
then declarethese exeptions under the exceptions tab.
in the source code of ur function module.
if
like this u can code .
now when u call the function module in tme mainprogram.
if some error occurs and u have declared a exception for this then it will set sy-subrc = value u give inthe call of this fm.
in the fm u can program these sy-subrc values and trigger the code for ur exception.
Please reward if useful
Regards,
Ravi
Edited by: Ravikanth Alapati on Mar 27, 2008 9:36 AM -
Enhancement spot - Function module not getting triggered in background
Hello Experts,
I have implemented an explicit enhancement spot. In the code implementation, I am calling a Function Module.
When I call that FM in background, things are not working as expected. But if I am calling that FM in normal mode, things are working fine.
I am passing parameter to FM by 'Value'.
Can anybody please let me know what I am doing wrong?
Regards,
AshishHi,
Enhancement not getting triggered in BDC
Regarding on your query, You would go through below link.
Screen Enhancement of Transaction CO11N
I hope, it helps to you.
Regards,
Sekhar -
Using a function module in a search help.
People,
I make a function module for a search help. Into the function module I call a function 'K_GROUP_SELECT' that show me a screen to make another search but I don't know how can I put the value that this function return me in the field that the user click the button of the search help in my program.
This is the code that I put in the function module.
Thanks!
FUNCTION Z_GROUP_SELECT_ZFINCOKOH1_B.
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*" VALUE(SHLP) TYPE SHLP_DESCR
tables: setheader.
data: setname type setheader-setname.
CONSTANTS:
CLASS TYPE SETCLASS VALUE '0103',
FIELD_NAME TYPE RGSBS-FIELD VALUE '*',
KOKRS TYPE TKA01-KOKRS VALUE 'BPPR',
KTOPL TYPE TKA01-Ktopl VALUE 'CAPI'.
IF callcontrol-step = 'SELECT'.
*PERFORM k_group_select USING: CLASS, FIELD_NAME, KOKRS, KTOPL.
CALL FUNCTION 'K_GROUP_SELECT'
EXPORTING
BUTTONS = 'X'
CLASS = CLASS
CRUSER = '*'
field_name = FIELD_NAME
SEARCHFLD = ' '
SEARCHFLD_INPUT = 'X'
SEARCHFLD_REQUIRED = 'X'
SET = '*'
START_COLUMN = 10
START_ROW = 5
TABLE = 'CCSS'
TYPELIST = 'BS'
UPDUSER = '*'
KOKRS = KOKRS
KTOPL = KTOPL
IMPORTING
SET_NAME = setname
EXCEPTIONS
NO_SET_PICKED = 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.
endif.
ENDFUNCTION.Carlos, Please see the following program. It is working well in my system. The only difference is that I've implemented you function module as a subroutine instead of in a FM. You can see that it will return the selected value back to the screen field.
report zrich_0002 .
data: setname type setheader-setname.
parameters: p_val type setheader-setname.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
at selection-screen on value-request for p_val.
perform f4_help.
p_val = setname.
start-of-selection.
* FORM f4_help *
form f4_help.
constants: class type setclass value '0103',
field_name type rgsbs-field value '*',
kokrs type tka01-kokrs value 'BPPR',
ktopl type tka01-ktopl value 'CAPI'.
call function 'K_GROUP_SELECT'
exporting
buttons = 'X'
class = class
cruser = '*'
field_name = field_name
searchfld = ' '
searchfld_input = 'X'
searchfld_required = 'X'
set = '*'
start_column = 10
start_row = 5
table = 'CCSS'
typelist = 'BS'
upduser = '*'
kokrs = kokrs
ktopl = ktopl
importing
set_name = setname
exceptions
no_set_picked = 1
others = 2.
endform.
REgards,
Rich HEilman -
Hi All,
I have created and tested the FM successfully, but can naybody guide me with regards to using the FM in the program.
My FM contains import parameters a and b of type i.
Export : res of type i.
I understand that we would have to use the pattern button to use the FM but any details would be great.
Regards,
Sagarhi,
supose ur function module has 2 import parameters and 1 export parameter then do the following in ur code where u r calling the function module:
=> declare 2 variables of the same type as import parameter
=> declare one variable of the same type as export parameter.
=> initialize these above declared variables(import parameters) with some value.
=> go to pattern and give ur function module name
=> ur function module structure will appear in ur code.
=> pass on ur locally declared variables to import parameter.
=> if ur function module works properly then the o/p will be in the export parameter which u had declared locally. -
Finding number of lines in a program/function module
Hi Expets,
I would like to know is there any way to find the number of code lines in a ABAP program/function module.
Additionally, can i extend this to a package such that the utility will find the number of codelines in all the programs/function modules/include programs in that package.
Any hints regarding the same would be appreciated.
Regards,
Ramanath1. First using Read report to load the source code to your internal table.
2. Using SCAN statement to do analysis about the source code. pls refer to the sap keyword help about "SCAN".
Syntax Diagram
SCAN
Note
This statement is for internal use only.
It cannot be used in application programs.
Variants:
1. SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2
...STATEMENTS INTO itab3.
2. SCAN AND CHECK ABAP-SOURCE itab1 ...RESULT INTO itab2.
Variant 1
SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2
...STATEMENTS INTO itab3.
Parts marked with " ..." are interchangeable
Extras:
1. ... FROM n1
2. ... TO n2
3. ... KEYWORDS FROM itab4
4. ... LEVELS INTO itab5
5. ... STRUCTURES INTO itab6
6. ... OVERFLOW INTO c1
7. ... WITH ANALYSIS
8. ... WITH COMMENTS
9. ... WITH INCLUDES [IMPLEMENTATIONS FROM itab]
10. ... WITH TYPE-POOLS
11. ... WITH LIST TOKENIZATION
12. ... PRESERVING IDENTIFIER ESCAPING
13. ... WITHOUT TRMAC
14. ... [INCLUDE] PROGRAM FROM c2
15. ... INCLUDE INTO c3
16. ... MESSAGE INTO c4
17. ... WORD INTO c5
18. ... LINE INTO n3
19. ... OFFSET INTO n4
20. ... WITH EXPLICIT ENHANCEMENTS [IMPLEMENTATIONS FROM itab]
21. ... FRAME PROGRAM FROM c2
22. ... ENHANCEMENTS INTO itab -
Hello,
In one of my function modules, I have the code as shown below. I got an error after executing this code. The error is:
In LOOP .... WHERE... the line type of the table must be statically defined.
<b>This error is for the highlighted LOOP statement.</b> Could someone please help me with the code.
<b>Objective of the function module:</b> I have a hashed table with some records.
Eg: CCTR FISCPER VERSION AMOUNT
100 06/2007 10 100
100 06/2007 20 0
100 07/2007 10 45
I want to update the amount for version '20' (for same costcenter and same period as of version 10) by doing some calculations.
FUNCTION YCALC_VALUE.
""Local Interface:
*" IMPORTING
*" REFERENCE(I_AREA) TYPE UPC_Y_AREA
*" REFERENCE(I_PLEVEL) TYPE UPC_Y_PLEVEL
*" REFERENCE(I_METHOD) TYPE UPC_Y_METHOD
*" REFERENCE(I_PACKAGE) TYPE UPC_Y_PACKAGE
*" REFERENCE(IT_EXITP) TYPE UPF_YT_EXITP
*" REFERENCE(ITO_CHASEL) TYPE UPC_YTO_CHASEL
*" REFERENCE(ITO_CHA) TYPE UPC_YTO_CHA
*" REFERENCE(ITO_KYF) TYPE UPC_YTO_KYF
*" EXPORTING
*" REFERENCE(ET_MESG) TYPE UPC_YT_MESG
*" CHANGING
*" REFERENCE(XTH_DATA) TYPE HASHED TABLE
FIELD-SYMBOLS: <xth_data> TYPE HASHED TABLE,
<ls_data> TYPE /1SEM/_YT_DATA_100KMPA,
<l_chavl> TYPE ANY,
field symbols for fields of <ls_data>
<ls_chas> TYPE /1SEM/_YT_CHAS_100KMPA,
<ls_nchas> TYPE /1SEM/_YT_CHAS_100KMPA,
<ls_kyfs> TYPE /1SEM/_YT_KYFS_100KMPA,
<ls_nkyfs> TYPE /1SEM/_YT_KYFS_100KMPA,
LOOP AT xth_data ASSIGNING <ls_data>.
ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO <ls_chas>.
ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <ls_data> TO <ls_kyfs>.
......There are some calculations................................
ENDLOOP.
LOOP AT xth_data INTO <ls_data>.
ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO <ls_nchas>.
ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <ls_data> TO <ls_nkyfs>.
IF ( <ls_data>-S_CHAS-0fiscper = '006' ) AND (<ls_data>-S_CHAS-0version='10' ).
tempcctr = <ls_data>-S_CHAS-0costctr.
tempperiod = <ls_data>-S_CHAS-0fiscper.
tempamount = <ls_data>-S_KYFS-0amount.
<b> LOOP AT XTH_DATA INTO <ls_nchas>
WHERE 0costctr = tempcostctr
AND 0fiscper = tempperiod
AND 0version = '20'.</b>
<ls_nchas>-S_KYFS-0amount = ( tempamount * 100 ) + 500.
MODIFY xth_data FROM <ls_nchas>.
ENDLOOP.
ENDFUNCTION.
Thank You.
Message was edited by:
George Smith
Message was edited by:
George SmithHi George..
Declare the Field symbol with the Same line type of the Internal table which is passed to the FM.
Eg:
<b>Field-symbols : <ls_data> like Line of XTH_Data.
Loop at XTH_Data ASSIGNING <LS_DATA>.</b>
Then it should work... -
Function module MC_SEND_MAIL
Hi Experts,
How can I use this Function Module 'MC_SEND_MAIL'?
Can anybody send me a sample code on how to use this function module for my reference.
Thanks!
JamesHi James,
go to SE37->MC_SEND_MAIL
know press ctrlshiff3 or go to Where-used-list, select Programs from the list and continue.
u will get a list of custom & standard programs, click on any one and analyse the usage of FM in the program.
thanks
ravi -
How to find the outbound idoc function module?(Urgent)
Dear All,
How to identify the outbound function module if there is process code assigned to message type.
For partner profile the mesasge type is assigned and idoc type .This is the only information maintained .
Now my question is how to identify the fucntion module which is getting trigger in the system is there any data maintained in the standard table or any t-code .
Points will be rewarded for right answers.
Thank You.
Regards,
Ravi GanjiHi,
If u know the message and basictype then we can know the process code for that message type in transaction code WE64.
if we know process codes then we can know the function modules in transaction codes WE41(Outbound process code) and WE42(Inbound process code).
Each process code is attached with a FM...
Reward if helpful
Regards,
Nagaraj -
How to add a created Z function module to the existing list in WE21
Hi all,
There is some existing function modules ( like EDI_PATH_CREATE_CLIENT_DOCNUM ) in WE21 in the function module field.
here, i need to create one Z function module as per user requirement & want to add to that list. is it possible???
actually, i want the file name format is like
" Document Number_YYYYMMDDHHMMSS.xml ". but existing function modules are not giving this format.do anybody give any idea.
correct answers will be rewarded.
Thanks & RegardsHI Pabitra,
Yes, can always change the existing fm and add it with message type as follows pls note step 7 and step 8. (for inbound it is we42 and for outbound it is we41 )
Basic IDOCs have supplied by SAP with standard structure. (Segments). You can extend them with your own segments.
IDOCs does have unique number. They contain control, data, and status records.
Useful Transaction Codes:
WEDI : IDoc Menu
WE02 : IDoc List (can enter IDoc number to select on)
WE05 : IDoc List
WE19 : Transaction WE19 can be used to test the IDoc
WE30 : IDoc Type Development: Initial Screen
WE31: Development Segments: Initial Screen
WE60 : Documentation for IDoc Types. This allows you to view the IDoc you have created.
WE81 : Display View EDI: Logical Message Types: Overview
WE82: Display View Message Types and Assignment to IDoc Types: Overview
WE21 - Creation of POrt
WE20 - Partner Profile creation
SALE - ALE (Application Linking and Enabling) settings
For Outbound ALE Configurations: (Example)
IDoc definitions and necessary ALE configurations settings for the outbound .
Create Idoc segments Transaction WE31.
Create Idoc type Transaction WE30.
Create Message Type Transaction WE81.
Assign Message Type to Idoc type Transaction WE82.
Create a distribution Model - Transaction BD64
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
for creating a IDOC
see the below steps for outbound processing IDOCS..
2.1 Outbound Interface
PROCESS DIAGRAM
Outbound Interface
1. Analyse Hierarchy Levels
2. Create New segment
3. Create New IDoc Type
4. Create New Message Type
5. Link Message with IDoc Type
6. Create an entry in EDP13 via transactions WE20 and BD64
7. Populate the Custom IDoc via ABAP Program
7b Error Handling
7c. Send Status Email
8. Test the Population of the Custom IDoc
Step 1 Analyse Hierarchy Levels:
Analyse the data relationships being processed in the interface. Define the appropriate hierarchical Parent-to-Child relationships.
Navigate to transaction code WEDI
Transaction WEDI displays the IDOC main menu. This allows navigation around the various development and control areas to create a customised IDOC.
Step 2 Create a new segment:
via wedi : Development - IDOC Segments or Transaction code WE31.
Enter segment name and click on Create.
The? name of the segment type must start with Z1 , and have a maximum of eight characters.
Enter description and enter the relevant field names and data elements.
The segment should represent a structure in the program so for? each field in the segment a field name and a data element must be defined.
Save the segment and enter Person Responsible and Processing Person .
Go to Edit and Set Release.
Repeat this procedure for each new Segment in the IDOC.
Step 3 Create a new IDOC Type
via wedi Development - IDOC Types or Transaction WE30.
Enter segment name (starting with Z), click on Basic Type and then Create.
Create as new, enter Person Responsible and Processing Person and enter description.
On Create Basic Type screen decide where segments should be inserted and go to Edit/Create Segment.
Complete relevant fields in the Maintain Attributes screen:
From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a Child.
When IDOC created return to initial screen. Go to Edit and Set Release.
Go to Transaction WE60 to view the IDoc Type you have created.
Step 4 Create new Message Type
via wedi Development - Message Types or Transaction WE81.
Display/Change and click on New Entries
Create a new Message Type and Save.
Step 5 Link Message Type to IDOC Type
via wedi Development - IDOC Type/Message or Transaction WE82.
Display/Change and then click on New Entries.
Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
Step 6 Create an entry in EDP13 via transactions WE20 and BD64.
The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
WE20 Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
BD64 Create a Model View, Enter Sender and Receiver Ports, Attach Message Type. Go to Environment on Menu and click on Generate Partner Profiles and generate (not save) profile.
Step 7 Populate the custom IDOC via ABAP Program
See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
The control record is filled into a structure like EDIDC. The message type and the Idoc type for the Idoc must be populated into the eddic structure.
- PERFORM populate_Control_structure USING c_mestyp
c_SEGMENT_type1.
The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
- PERFORM transfer_Parent_data_to_seg.
The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
- PERFORM master_idoc_distribute.
NOTE: This function module is only called for stand alone programs and Shared Master Data programs (SMD). It is not called when using extensions or output determination.
The ALE Layer handles the sending of the IDOC to the receiving system.
Error Handling (see Step 7b).
Commit work.
Project SpecificStep 7b Error Handling
Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
Declare a structure of type MCMAILOBJ for sending instructions.
Enter values for the internal table based on structure MCMAILOBJ
For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module MC_SEND_MAIL.
Enter values in the following parameters: -
MS_MAIL_SENDMODE = B (Batch Mode)
MS_MAIL_TITLE = 'Mail Title'
MS_MAIL_DESCRIPTION = Error description (e.g. MATNR not given)
MS_MAIL_RECEIVER = Name of Receiver (To be determined)
MS_MAIL_EXPRESS = E (Express Delivery)
MS_MAIL_DLINAME = Leave Blank
MS_MAIL_LANGU = 'E' (Language)
MS_MAIL_FUNKOBJ_NAME = Leave Blank
TABLES
MS_MAIL_CONT = I_MCMAILOBJ
Note:
It has to be determined separately for each interface how these errors and mail notifications are to be grouped dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
<b>Step 7
(Transaction WE57)
Assign the custom function module to the IDoc type and the message type.
Set function module to type F and direction 2 for inbound.
Step 8
(Transaction WE42)
Create a new process code and assign it to the function module. The process code determines how the incoming IDoc is to be processed in SAP.</b>
Step 9
(Transaction BD67)
Assign the function module to the process code created above. Got to New Entries and enter the process code and the function module name.
Step 10
(Transaction WE20 and Transaction BD64)
Create a partner profile for your message and ensure that in transaction WE20 the process code is the one that points to your function module. (See step 6 of creating Outbound Idocs).
Step 11
Ensure that error handling functionality is present.
If u still have doubt, i can send u the print screen doc - hope this helps u
<b>Reward pts if found usefull :)</b>
regards
Sathish
Maybe you are looking for
-
Wireless and ePrint with Photosmart D110
Hi Recently changed router and printing stopped. Printer was reconfigured to router and the wireless test was successful. When I try to install the driver on the laptop, it wont recognise the IP address that the printer shows. So I tried the ePrint f
-
Back ground printing in all balck
I just bought a new HP Laserjet M451DN color printer when I turn the color off to print in black and white all my pdf's print with a black back ground i'm using adobe reader 11 (Xi) I have went in and made sure it says to print text black and back gr
-
ITunes 11.2.1 is unable to change metadata
After this recent update of iTunes to version 11.2.1 I'm no longer able to change metadata of any MP3 file without that the spinning ball takes an infinity spinning tour. I have to kill the iTunes process. Befor this update I changed mass of files th
-
Can any one please tell me in easy language about performance tuning methods. Please don't give online doc as a reference.
-
How to increase display time of Toast notifications in Windows 10?
Hi, I want to know how to increase display time for Windows toast notification in Windows 10.