2011 Jun 13 4:30 PM
Hello Gurus,
I m facing a starnge issue. I am using aFunbction module, 'SCMS_ARCHIVE_INFO_GET' to get the detail of content repository setup in SAP.
Now in this function module the export parameters, BASICPATH and ARCHIVPATH are defined as type 'C'. But when I execute the FM, I see the datatype for these fields and some others which are defined as Type C, gets changed to Type C(200) in the ABAp debugger. This FM test execution is successful.
But when the background user tries to use the same FM in a program during debugging, the data type remains Type C as defined in FM export parameters and the FM execution terminates.
Can someone tell me why is the difference and what do I need to do make sure that the data type does change to C(200) and does not remain TyPE C becasue then it fails.
Regards,
Tushar.
2011 Jun 13 4:41 PM
Hello Gurus,
I m facing a starnge issue. I am using aFunbction module, 'SCMS_ARCHIVE_INFO_GET' to get the detail of content repository setup in SAP.
Now in this function module the export parameters, BASICPATH and ARCHIVPATH are defined as type 'C'. But when I execute the FM, I see the datatype for these fields and some others which are defined as Type C, gets changed to Type C(200) in the ABAp debugger. This FM test execution is successful.
But when the background user tries to use the same FM in a program during debugging, the data type remains Type C as defined in FM export parameters and the FM execution terminates.
Can someone tell me why is the difference and what do I need to do make sure that the data type does change to C(200) and does not remain TyPE C becasue then it fails.
Regards,
Tushar.
2011 Jun 13 4:41 PM
2011 Jun 13 4:47 PM
Can you please elaborate ? What do you mean by specify length of variable as 1024. This is a standard FM which is used inside another FM 'ARCHIV_PROCESS_FAXINPUT'.
This is how data is passed inside the FM:
if archiv_id ne space.
call function 'SCMS_ARCHIVE_INFO_GET'
exporting
arc_id = archiv_id
IMPORTING
VERSION = version
EXCEPTIONS
ERROR_CONFIG = 1
OTHERS = 2
.
if sy-subrc ne 0.
status = nothing_done.
message e507 raising no_workitem_created.
endif.
endif.
Regards,
Tushar.
2011 Jun 13 4:53 PM
But it doesn't pass either of the two parameters you are asking about.
Rob
2011 Jun 13 5:02 PM
Yes, it doesn't pass the two parameters, but due to that, the file path remains Type C due to which during following form routine, it gives error in CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_PLATFORM since its background user since the variable 'file' only copies first alphabet of complete file path and hence it reaches the above FM during which it fails....
perform check_and_add_delimiter in program scms using file.
2011 Jun 13 5:04 PM
Well, methods of class CL_GUI_FRONTEND_SERVICES cannot be called in the background. The GUI is not available.
Rob
2011 Jun 13 5:09 PM
I guess, I have to copy this FM in ZFM and pass the parameters, its not passing in standard SAP FM....
Regards,
Tushar.
2011 Jun 13 5:14 PM
You still won't be able to access the GUI in the background.
You have said what your error is, but you haven't said what you are trying to do. That might help.
Rob
2011 Jun 13 5:43 PM
The issue is with SAP function module. In ZFM I was able to solve issue. Since now the correct data type is passed ebcause I pass the export parameter to SCMS function module.
In SAP, it was not passed. Since data type was not passed, SAP was excuting condition for GUI class and hence the issue. I am planning to create OSS not and tell SAP how they should do it...
call function 'SCMS_ARCHIVE_INFO_GET'
exporting
arc_id = archiv_id
IMPORTING
VERSION = version
BASICPATH = V_BASICPATH
ARCHIVPATH = V_ARCHIVPATH
SPOOLPATH = V_SPOOLPATH
PHYS_BASICPATH = V_PHYS_BASICPATH
PHYS_ARCHIVPATH = V_PHYS_ARCHIVPATH
EXCEPTIONS
ERROR_CONFIG = 1
OTHERS = 2
.
Hence the condition for if-endif for GUI forntend class in this FM does not execute and I am able to it successfully as I wanted. I just tested...
Regards,
Tushar.
Edited by: Tushar Shah on Jun 13, 2011 6:43 PM
Edited by: Tushar Shah on Jun 13, 2011 6:45 PM
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |