2009 Mar 21 1:08 AM
Hi
I am using l_to_create_single in a program which is run in background mode. I am using this FM in a loop to create TO's. But if at all, any line of the loop has a problem creating a TO, then I am unable to go to the next line in the loop. The function module returns an error in itself, i.e., if there is any error with the material or bin, then it fails inside the function module itself. Does any one have any idea to override this.
Thanks
2009 Mar 21 2:11 AM
hi,
may be you can do some check before calling the FM to avoid it.
is the fm throwing an error message then probably u can chage the type of error message or supress it, i'll can let u know how to do it, once i'll reach my sap system tommorow
2009 Mar 21 2:11 AM
hi,
may be you can do some check before calling the FM to avoid it.
2009 Mar 23 7:35 PM
2009 Mar 23 7:41 PM
is the fm throwing an error message then probably u can chage the type of error message or supress it, i'll can let u know how to do it, once i'll reach my sap system tommorow
2009 Mar 23 8:04 PM
2009 Mar 23 8:20 PM
If you check the code inside the fm
if i_kompl = con_x and i_anfme > ltap-vsola.
message e332 raising no_to_created.
endif.
I think this will be caused by data . (strange!!!! error message inside fm)
a®
2009 Mar 23 8:23 PM
(strange!!!! error message inside fm)
Not really - the raising just sets the return code and if the calling program checks for the exception, I don't think the error is produced.
Rob
2009 Mar 23 8:32 PM
Rob,
I was wrong. sorry about this.
This is documentaiton
If the MESSAGE-statement is processed with the addition RAISING during processing of a method or a function module whose caller assigns a return value to the exception exception with the addition EXCEPTIONS of the statement CALL, it has the same effect as the statement RAISE. If no return value is assigned to the exception exception, then the addition RAISING is ignored and the message is processed according to its message type
a®
2009 Mar 23 8:52 PM
I've been tripped up on that myself a number of times. But if you put a break-point at the keyword 'message' and then run a standard SAP transaction, you might be surprised to see how often this is done.
Rob
2009 Mar 23 9:01 PM
Rob,
So is it that I am looking it wrong or is there any work around for my above requirement.
thanks.
2009 Mar 23 9:09 PM
Hard to say - you haven't given enough information for a good response. You haven't said which FM you are using.
Bear in mind that using unreleased, undocumented FMs can lead to problems. I'd look for a BAPI or failing that use BDC.
Or take the first suggestion and capture the error before calling the FM.
Sorry - I just saw that you did mention the FM, so if you catch the exception, it should work.
Rob
Edited by: Rob Burbank on Mar 23, 2009 5:09 PM
2009 Apr 01 4:35 PM
ROB/ ARS,
Please see,
There are numerous error messages in this FM,
This is really strange to have error messages directly in the function module,
does any one have any idea how to over come these..
PERFORM RUECKPLATZ_SPERREN USING RETURNCODE.
IF RETURNCODE = R_PLATZ_GESPERRT.
PERFORM PROT_MESSAGE USING '145' LTAP-RLPLA BL BL BL.
MESSAGE E145 WITH LTAP-RLPLA.
ENDIF.
*........Rückquant prüfen...............................................
PERFORM RUECKQUANT_PRUEFEN USING RETURNCODE.
CASE RETURNCODE.
WHEN R_OK.
WHEN R_QUANT_NICHT_ANGEG.
WHEN R_QUANT_NICHT_VORHA.
WHEN R_SPERRE_EINLAG.
PERFORM PROT_MESSAGE USING '014' BL BL BL BL.
MESSAGE E014.
WHEN R_ZULAG_VERBOTEN.
PERFORM PROT_MESSAGE USING '035' LTAP-MATNR LTAP-RLTYP BL BL.
MESSAGE E035 WITH LTAP-MATNR LTAP-RLTYP.
WHEN R_MISCH_VERBOTEN.
PERFORM PROT_MESSAGE USING '036' LTAP-RLTYP BL BL BL.
MESSAGE E036 WITH LTAP-RLTYP.
ENDCASE.
2009 Apr 14 2:30 PM
Hello experts,
sorry if i am pushing this again. I am still having this issue, can anyone suggest something here.
2009 Mar 23 9:29 PM
Hi - if you think that this is not coming from FM, then you can try to uncomment the exception after calling the FM, and try to handle the error accordingly, if you get any sy-subrc other than 0, then probably u can give an "continue" to go to next line of loop.
Kuntal
2009 Mar 24 8:35 AM
check this FM CM_F_MESSAGE
it has BADI buiaddin_contr_msg->modify_controllable_message
Use this to change the standard message
кu03B1ятu03B9к
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |