Problem when creating sapscript from within function module

Hi,
I created a function module which retrieves some master data, creates a sapscript for displaying the data and finally converts the sapscript to an otf. Afterwards the otf is converted to a pdf file.
The problem is that the pdf file is created but it is empty!
Here is a piece of the code:
FUNCTION zhr_display_jobdescrpdf.
* To access the SAP script output in OTF format.
struct-tdgetotf = 'X'.
struct-tdprogram = SY-REPID.
CALL FUNCTION 'OPEN_FORM'
     EXPORTING
*           APPLICATION        = 'TX'        " this is SapScript Appl
          device             = 'PRINTER'   " allow output to printer
          dialog             = 'X'         " printer dialog requested
          form               = 'ZHR_JOB_DESCR'       " name of form (SE71)
          language           = 'E'
          OPTIONS            = struct
CALL FUNCTION 'START_FORM'
EXPORTING
*   ARCHIVE_INDEX          =
   form                   = 'ZHR_JOB_DESCR'
   language               = 'E'
*   STARTPAGE              = ' '
*   PROGRAM                = ' '
*   MAIL_APPL_OBJECT       =
*   IMPORTING
*   LANGUAGE               =
CALL FUNCTION 'WRITE_FORM'
     EXPORTING
       element                        = 'TEXT'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
CALL FUNCTION 'END_FORM'
* IMPORTING
* RESULT =
EXCEPTIONS
CALL FUNCTION 'CLOSE_FORM'
* IMPORTING
* RESULT =
* RDI_RESULT =
TABLES
otfdata = datab[]
EXCEPTIONS
ENDFUNCTION.
The content of datab[] is:
1     //     XHPLJIIID    0700 0000000000
2     IN     01EZHR_JOB_DESCR   MAIN
3     OP     DINA4   P 144  240 1683811906000010000100001
4     IN     02MAIN
5     EP
6     //
So none of the variables that are used in the sapscript were transferred, although they are filled with the correct values when I put a breakpoint on the function 'write_form'. It looks like the sapscript can't access variables that are declared in a function module.
Putting all the code for creating the sapscript in a report is not an option because then I have to use export/import to/from memory for retrieving the otf data and this doesn't work with the sap portal where the function is called.
Did anyone had the same or similar problem?
Greetings,
Frederik

Hi,
Yes my problem is already solved.
I created a report which creates the sapscript and in my function module I just execute that report.
So problem solved :-).
Greetings;
Frederik

Similar Messages

  • Problems when Creating Pages from Templates in Dreamweaver 8

    When creating new pages from templates in Dreamweaver 8(Ver
    8.0.2). The full path for images is not created
    i.e. in template the code is <img src="main_page_logo.png"
    width="814" height="172" longdesc="Main Page Logo" />
    In the new file the code should be :-
    <img src="../../Templates/main_page_logo.png" width="814"
    height="172" longdesc="Main Page Logo" />
    but only :-
    <img src="main_page_logo.png" width="814" height="172"
    longdesc="Main Page Logo" /> is in the code.
    but this does work in Version 8.0.
    Does anyone know of a setting or fix for this problem

    > Does anyone know of a setting or fix for this problem
    It was regarded as a bug in previous versions, and was fixed
    in the 8.0.2
    release. In normal circumstances, ALL links in a template
    file must be
    relative to the template document, not relative to where you
    intend to save
    the child pages. Thus, there would be no way to have a link
    in your
    template document like the first one you show, e.g.,
    <img src="whatever.png"....
    *unless* the file was actually in the Templates folder (a bad
    idea).
    In 8.0.2, you can set your PREFERENCES for the Templates
    category to NOT
    MANAGE relative links. Be aware that this may have unintended
    consequences
    for you - specifically regarding other relative links in your
    site.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "pgs_it" <[email protected]> wrote in
    message
    news:eivj88$361$[email protected]..
    > When creating new pages from templates in Dreamweaver
    8(Ver 8.0.2). The
    > full
    > path for images is not created
    > i.e. in template the code is <img
    src="main_page_logo.png" width="814"
    > height="172" longdesc="Main Page Logo" />
    > In the new file the code should be :-
    > <img src="../../Templates/main_page_logo.png"
    width="814" height="172"
    > longdesc="Main Page Logo" />
    > but only :-
    > <img src="main_page_logo.png" width="814"
    height="172" longdesc="Main Page
    > Logo" /> is in the code.
    > but this does work in Version 8.0.
    > Does anyone know of a setting or fix for this problem
    >
    >
    >

  • Problem when creating a sales order with reference by BAPI

    I am facing one problem when creating Sales Order.
    <b>The scenario is like this while creating SO With reference to an Order type, a new SO will be automatically created with a diff order Type</b>.
    I am using "BAPI_SALESORDER_CREATEFROMDAT2".
    I am calling this BAPI in USEREXIT_REFRESH_DOCUMENT.
    Am I using the right exit to call this Bapi ?
    <b>Problems are like :
    1. Ref Sales Order creating without Sales Unit .
    2. "Object Status does not exist" error msg is coming for Header and Item level(when clicking the status tab and then object status pushbutton).</b> But if testing the bapi from SE37 in test sequence....no such problem persists.
    As for example in case of sales unit,in the debugging mode i have seen that BAPI uses a perform to fill the values in the VBAP structure.But after that when it come back to the main program VBAP remains blank.This ocuurs when the BAPI is called from the exit whereas  if tested from SE37, VBAP retains the value.
    Can u suggest in this ? This is very very urgent............
    Thx in Adv.........................

    Thanks........
    Your suggestion was a great help to me.I have used a custom FM and called it in <b>starting new task</b>.
    Since i am a university fresher working in SAP for nearly 1 year.....can you please explain me the difference between <b>in update task</b> and <b>starting new task</b>.Why the problem was occuring for which you have suggested to call a custom function module.
    what is V1 update and V2 update?Is it attached with asynchronous ans synchronous update.It would be a great help to me if you kindly clear my confusions....
    thanks in advance.

  • Getting error when creating a RFQ in MM module" create rfq item overview"

    Hi,
    i am a beginer in SAP administration, users are getting this error message and i have done all my research and not able to resolve this issue.
    This error i am getting when creating a RFQ in MM module and when trying to save the screen "create rfq item overview" then it gives me a pop up box message " SAP SYSTEM MANAGER: WORK PROCESS RESTARTED, SESSION TERMINATED".
    Here are the details of teh system
    SAP Version :ideas 4.7
    Database :Oracle
    OS : windows 2003
    Module user is working on MM
    user working on it is a Super user with all the permissions
    SAP is configure to run under the  European date and decimal format.
    I have never done any database administration on it, it is a new install and has been rarely used.
    User creates a RFQ and when he tries saving it , seems like for the first time after either restarting the macine or restarting the service it might work and at time it might not, this is a very sporadic error and most of the times it crashes out with the message "sap system manager:work process restarted, session terminated" and kicks the user out of the session.
    Below are the details of the error message from ST22 :
    name of the runtime error : system_core_dumped
    below are the details of the error message and its resoltion as suggested by sap help :
    ========
    Runtime Errors         SYSTEM_CORE_DUMPED           
           Occurred on     01.02.2008 at 07:52:19
    Process terminated by signal " ".                                             
    What happened?
    The current ABAP program had to be terminated because the                     
    ABAP processor detected an internal system error.                             
    The current ABAP program "SAPLCLSC" had to be terminated because the ABAP     
    processor discovered an invalid system state.                                 
    What can you do?
                                                                                    Make a note of the actions and input which caused the error.                                                                               
    To resolve the problem, contact your SAP system administrator.                                                                               
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer      
    termination messages, especially those beyond their normal deletion           
    date.                                                                               
    Error analysis
    An SAP System process was terminated by an operating system signal.           
                                                                                    Possible reasons for this are:                                                
    1. Internal SAP System error.                                                 
    2. Process was terminated externally (by the system administrator).           
               Last error logged in SAP kernel                                    
                                                                                    Component............ "Taskhandler"                                           
    Place................ "SAP-Server server1_DEV_00 on host server1 (wp 1)"      
    Version.............. 1                                                       
    Error code........... 11                                                      
    Error text........... "ThSigHandler: signal"                                  
    Description.......... " "                                                     
    System call.......... " "                                                     
    Module............... "thxxhead.c"                                            
    Line................. 9555                                                                               
    How to correct the error
    The SAP System work directory (e.g. /usr/sap/c11/D00/work ) often             
    contains a file called 'core'.                                                                               
    Save this file under another name.                                                                               
    If you cannot solve the problem yourself, please send the                     
    following documents to SAP:                                                                               
    1. A hard copy print describing the problem.                                  
       To obtain this, select the "Print" function on the current screen.         
                                                                                    2. A suitable hardcopy prinout of the system log.                             
       To obtain this, call the system log with Transaction SM21                  
       and select the "Print" function to print out the relevant                  
       part.                                                                               
    3. If the programs are your own programs or modified SAP programs,            
       supply the source code.                                                    
       To do this, you can either use the "PRINT" command in the editor or        
       print the programs using the report RSINCL00.                                                                               
    4. Details regarding the conditions under which the error occurred            
       or which actions and input led to the error.                                                                               
    System environment
    SAP Release.............. " "                                                                               
    Application server....... " "                                                 
    Network address.......... " "                                                 
    Operating system......... " "                                                 
    Release.................. " "                                                 
    Hardware type............ " "                                                 
    Character length......... " " Bits                                            
    Pointer length........... " " Bits                                            
    Work process number...... " "                                                 
    Short dump setting....... " "                                                                               
    Database server.......... " "                                                 
    Database type............ " "                                                 
    Database name............ " "                                                 
    Database owner........... " "                                                                               
    Character set............ " "                                                                               
    SAP kernel............... " "                                                 
    Created on............... " "                                                 
    Created in............... " "                                                 
    Database version......... " "                                                                               
    Patch level.............. " "                                                 
    Patch text............... " "                                                                               
    Supported environment....                                                     
    Database................. " "                                                 
    SAP database version..... " "                                                 
    Operating system......... " "                                                 
    User, transaction...
    Client.............. " "                                                      
    User................ " "                                                      
    Language key........ " "                                                      
    Transaction......... "ME41 "                                                  
    Program............. "SAPLCLSC"                                               
    Screen.............. "SAPMM06E 0320"                                          
    Screen line......... 71                                                       
    Information on where termination occurred
    The termination occurred in the ABAP program "SAPLCLSC" in "EXECUTE_SELECT".  
    The main program was "SAPMM06E ".                                                                               
    The termination occurred in line 131 of the source code of the (Include)      
    program "LCLSCF2G"                                                           
    of the source code of program "LCLSCF2G" (when calling the editor 1310).      
    =============
    i even tried increasing the dialog processes but with no use.The same error occurs.
    I appreciate every one of help i can get, i am working on a deadline which is tomorrow evening to resovle this issue, any kind of help is highly appreciated.
    thanks
    mudessir.

    Hi Mudessir,
    With the help of ABAP'er try the following.
    1. open the program 'LCLSCF2G' from SE38.
    2. Keep a break point at line no: 131.
    There is 'END SELECT' statement which is getting failed at line no 131 in the program.
    Try to analyse the SY-SUBRC at that point.
    If your technical consultant can't solve this, write to SAP OSS (service.sap.com).
    I have searched SAP OSS, there are other situations, but your case is not there. So write to SAP if technical consultant can't solve it by debugging the program.
    Regards,
    Madhu.

  • Getting values from a function module called in a WDA method

    Friends,
    I am trying to execute a function module from WDA.
    I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
    I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
    When the event handler method containing the call to the function module is executed, nothing happens.
    I am not sure how to pass values to the function module and to get the return values from the function module.
    I am new to using function modules from WDA. Please help me out.
    Thanks and Regards.

    Rashmi,
    Is the function module intended to collect input data from the UI and process it? - Yes
    If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
    Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
    Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
    The function module takes a single value as import parameter and returns a table of values as return value.
    It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
    Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
    Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
    Thanks and Regards.

  • Problem with creating pdf from Microsoft Publisher 2013

    We are having problems in creating pdfs from Microsoft Publisher2010- When the function 'Adobe PDF' is selected and 'Print' is clicked on nothing happens. The progress bar just sits there for several minutes without creating a pdf. We have to click on cancel and when this is done this crashes Microsft Publisher.
    I have repaired this using the repair facility in Acrobat 9. I have also uninstalled Acrobat 9 and reinstalled this.
    I have also uninstalled Adobe Reader XI and reinstalled Adobe Reader 9.
    Before uninstalling Acrobat I also ran the updates but this didnt help either.
    This is on a Windows 7 PC (64-bit)
    Adobe Acroabt 9 Pro Extended
    Microsoft Publisher 2010.
    Any help is appreciated.
    Thanks

    MS Publisher 2010 is not supported by the Acrobat 9 Family; and the PDFMaker extension for Publisher has been removed completely from the Acrobat XI Family, so upgrading won't help either. Sorry!
    See http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html#main_ PDFMaker_compatible_applications

  • Problem when Creating Project (Composite Application Services) in NWDS

    I've seen a few posts regarding this but I don't feel as if any real solution was given.
    I just installed Netweaver Developer Studio (7.0.15) with the current JDK/JRE (1.6.0_07).  When trying to create a new Composite Application Services project within the Studio, using the new project wizard, I get an error: Problem when Creating Project.
    I get the EJB Module and Dictionary to create within my navigator with no problems, however, during the creation of the metadata, the error occurs.  I do have the metadata folder appear within the navigator, but nothing in it.  None of the other three items are created.
    I have tried the attempt at deleting the metadata folder within my workspace directory and trying again but the same exact result occurs.
    Is there any other solution out there for this problem besides attempting to find older versions of NWDS, etc. that are more "stable"?
    Thank you!

    Durga,
    Very simple but effective solution.
    I had tried uninstalling / re-installing NWDS with no effect but uninstalling / re-installing NWDS AND all java related products on my machine did work.
    Note: For anyone else with this issue in the future.  I installed the Java SDK / JRE 1.4.2_18 with NWDS 7.0.15 in case this is also a possible issue with versions.
    Thanks, Durga!

  • 8i personal : error when Create user defined aggregate function

    Hi,
    I have problem on creating user defined aggregate function.
    I try to create the sample aggregate function "SecondMax" from 9i developer guide(append at the end of this post).
    It's work to create object type and the type body, but
    there is error when I create the aggregate function..
    "CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;"
    I am using 8i personal now.. is that the syntax of create function in 9i is different from that in 8i?
    Example: Creating and Using a User-Defined Aggregate
    This example illustrates creating a simple user-defined aggregate function SecondMax() that returns the second-largest value in a set of numbers.
    Creating SecondMax()
    Implement the type SecondMaxImpl to contain the ODCIAggregate routines.
    create type SecondMaxImpl as object
    max NUMBER, -- highest value seen so far
    secmax NUMBER, -- second highest value seen so far
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number,
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl,
    value IN number) return number,
    member function ODCIAggregateTerminate(self IN SecondMaxImpl,
    returnValue OUT number, flags IN number) return number,
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl,
    ctx2 IN SecondMaxImpl) return number
    Implement the type body for SecondMaxImpl.
    create or replace type body SecondMaxImpl is
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number is
    begin
    sctx := SecondMaxImpl(0, 0);
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl, value IN number)
    return number is
    begin
    if value > self.max then
    self.secmax := self.max;
    self.max := value;
    elsif value > self.secmax then
    self.secmax := value;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN SecondMaxImpl, returnValue OUT
    number, flags IN number) return number is
    begin
    returnValue := self.secmax;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl, ctx2 IN
    SecondMaxImpl) return number is
    begin
    if ctx2.max > self.max then
    if ctx2.secmax > self.secmax then
    self.secmax := ctx2.secmax;
    else
    self.secmax := self.max;
    end if;
    self.max := ctx2.max;
    elsif ctx2.max > self.secmax then
    self.secmax := ctx2.max;
    end if;
    return ODCIConst.Success;
    end;
    end;
    Create the user-defined aggregate.
    CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;
    Using SecondMax()
    SELECT SecondMax(salary), department_id
    FROM employees
    GROUP BY department_id
    HAVING SecondMax(salary) > 9000;

    This could be a x64/x86 problem. Try following this thread
    [GetCompanyService|GetCompanyService] and recompile your code for the platform you need.

  • Can anybody explain me creating Generic Datasource using Function module?

    Hi,
    can anybody explain me creating Generic Datasource using Function module?
    Thax in advance,
    Ravi.

    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    1. Create s structure with the fields that you need from the 4 tables . Activate.
    2. Goto SE 80 Select The Function Group , Copy , Select the Function module
    " RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
    Y or Z .
    3. SE37 ->Your Function module name -> Change , In table tab give your structure
    name by deleting the associated type given in " E_T_DATA " .
    4. Now select source code and Do the coding . Give Data source name in Coding .
    In your case you have to take data from more that 1 table .
    5. Activate the Function Group .
    6. In RSO2 Create the Data source , Give the Function Module Name , And Save.
    7. RSA3 -> Give data source name and Check for the Records .
    Creation of custom datasource. (Using function module)
    <b>is an example</b>
    1.Create a function group .
    2. Structure ZTEST123
    ZMATNR MATNR CHAR 18 0 Material Number
    ZMTART MTART CHAR 4 0 Material type
    ZMBRSH MBRSH CHAR 1 0 Industry sector
    ZMATKL MATKL CHAR 9 0 Material group
    ZBISMT BISMT CHAR 18 0 Old material number
    ZMAKTX MAKTX CHAR 40 0 Material description
    3. Create function module (i.e. ZTEST….) .
    FM - YMARA_DATA_TRNS
    FUNCTION YMARA_DATA_TRNS.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
    *" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *" TABLES
    *" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *" E_T_DATA STRUCTURE ZTEST123 OPTIONAL
    *" EXCEPTIONS
    *" NO_MORE_DATA
    *" ERROR_PASSED_TO_MESS_HANDLER
    data : ZTEST123 type ZTEST123 occurs 0 with header line.
    Maximum number of lines for DB table
    STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    S_COUNTER_DATAPAKID LIKE SY-TABIX.
    DATA: begin of t_mara occurs 0,
    ZMATNR type MATNR,
    ZMTART type MTART,
    ZMBRSH type MBRSH,
    ZMATKL type MATKL,
    ZBISMT type BISMT,
    end of t_mara.
    DATA: begin of t_makt occurs 0,
    ZMATNR type MATNR,
    ZMAKTX type MAKTX,
    end of t_makt.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
    IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Check DataSource validity
    CASE I_DSOURCE.
    WHEN 'ZZMARA_DATA'.
    WHEN OTHERS.
    IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
    LOG_WRITE 'E' "message type
    'R3' "message class
    '009' "message number
    I_DSOURCE "message variable 1
    ' '. "message variable 2
    RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
    Fill parameter buffer for data extraction calls
    S_S_IF-REQUNR = I_REQUNR.
    S_S_IF-DSOURCE = I_DSOURCE.
    S_S_IF-MAXSIZE = I_MAXSIZE.
    ELSE. "Initialization mode or data extraction ?
    Data transfer: First Call OPEN CURSOR + FETCH
    Following Calls FETCH only
    First data package -> OPEN CURSOR
    IF S_COUNTER_DATAPAKID = 0.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
    select MATNR
    MTART
    MBRSH
    MATKL
    BISMT
    from mara up to 10 rows
    into table t_mara.
    if not t_mara[] is initial.
    select MATNR
    maktx
    from makt
    into table t_makt
    for all entries in t_mara
    where matnr = t_mara-zmatnr.
    endif.
    loop at t_mara.
    read table t_makt with key zmatnr = t_mara-zmatnr.
    ZTEST123-zmatnr = t_mara-zmatnr.
    ZTEST123-ZMTART = t_mara-ZMTART.
    ZTEST123-ZBISMT = t_mara-ZBISMT.
    ZTEST123-ZMBRSH = t_mara-ZMBRSH.
    ZTEST123-ZMATKL = t_mara-ZMATKL.
    ZTEST123-zmaktx = t_makt-zmaktx.
    append ZTEST123.
    clear ZTEST123.
    endloop.
    clear E_T_DATA.
    refresh E_T_DATA.
    E_T_DATA[] = ZTEST123[].
    ENDIF.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    ENDIF. "Initialization mode or data extractio
    ENDFUNCTION.
    3. Create the data source using transaction (RSO2).
    4. If structure exists for the table parameter of your function module then ok else create a structure for the table parameter ‘E_T_DATA’.
    5. Test the datasource in R/3 using transaction RSA3.
    6. Transfer the data source to BW –System and replicate it in the BW-System.

  • Loading the SCCM 2012 R2 Cmdlets from within a module

    Hi together,
    In the following article was described how to load the Powershell Module for SCCM 2012:
    http://blogs.technet.com/b/configmgrteam/archive/2013/03/27/powershell-connecting-to-configuration-manager.aspx
    I've taken the code to build a function to load the Powershell Module which works fine when i directly integrate it in my scripts.
    Currently i build a Module called SCCM-HelperFunctions.psm1 and the above mentioned function is one which i want to integrate, i named it "Import-Cmdlets". The Import of my Module works fine,  the function "Import-Cmdlets" is available
    trough IntelliSense and the command ends with no errors in the context of the given Site (ex. "PS CM1:\") but when i try to use SCCM Cmdlets the Command is not found.
    I've checked if the Module was loaded successfully but it isn't. Following is the function included in the Module:
    Function Import-SCCMCmdlets {
    <#
    .SYNOPSIS
    Lädt die SCCM Cmdlets und wechselt in den Kontext der angegebenen Site.
    .DESCRIPTION
    Die Funktion Import-SCCMCmdlets lädt die Powershell Cmdlets und wechselt in den PSDrive Kontext des angegebenen Sitecodes.
    In diesem Kontext können dann die in folgeendem Artikel aufgeführten Cmdlets ausgeführt werden:
    http://technet.microsoft.com/en-us/library/jj821831%28v=sc.20%29.aspx
    .PARAMETER Sitecode
    Eine Zeichenkette mit dem Sitecode der CAS oder Primary Site in dessen Kontext die Cmdlets laufen sollen.
    .EXAMPLE
    Import-SCCMCmdlets -SiteCode "P01"
    .EXAMPLE
    $SiteCode = "P01"
    Import-SCCMCmdlets -SiteCode $SiteCode
    #>
    Param (
    [Parameter(Mandatory=$true)]
    $SiteCode
    $null = Import-Module ($env:SMS_ADMIN_UI_PATH.Substring(0,$env:SMS_ADMIN_UI_PATH.Length – 5) + '\ConfigurationManager.psd1')
    Set-Location "$($SiteCode):" | Out-Null
    if (-not (Get-PSDrive -Name $SiteCode))
    Throw "Beim Versuch das Powershell Modul zu laden und auf das PSDrive $Sitecode zu wechseln trat ein Fehler auf."
    The exact same function works when i copy it to the ISE and run it.
    Does anyone have any ideas and can point me into the right direction? (eventually different workspaces when the function runs from within the module or something like that?)
    Best regards
    Rolf

    Hi together,
    In the following article was described how to load the Powershell Module for SCCM 2012:
    http://blogs.technet.com/b/configmgrteam/archive/2013/03/27/powershell-connecting-to-configuration-manager.aspx
    I've taken the code to build a function to load the Powershell Module which works fine when i directly integrate it in my scripts.
    Currently i build a Module called SCCM-HelperFunctions.psm1 and the above mentioned function is one which i want to integrate, i named it "Import-Cmdlets". The Import of my Module works fine,  the function "Import-Cmdlets" is available
    trough IntelliSense and the command ends with no errors in the context of the given Site (ex. "PS CM1:\") but when i try to use SCCM Cmdlets the Command is not found.
    I've checked if the Module was loaded successfully but it isn't. Following is the function included in the Module:
    Function Import-SCCMCmdlets {
    <#
    .SYNOPSIS
    Lädt die SCCM Cmdlets und wechselt in den Kontext der angegebenen Site.
    .DESCRIPTION
    Die Funktion Import-SCCMCmdlets lädt die Powershell Cmdlets und wechselt in den PSDrive Kontext des angegebenen Sitecodes.
    In diesem Kontext können dann die in folgeendem Artikel aufgeführten Cmdlets ausgeführt werden:
    http://technet.microsoft.com/en-us/library/jj821831%28v=sc.20%29.aspx
    .PARAMETER Sitecode
    Eine Zeichenkette mit dem Sitecode der CAS oder Primary Site in dessen Kontext die Cmdlets laufen sollen.
    .EXAMPLE
    Import-SCCMCmdlets -SiteCode "P01"
    .EXAMPLE
    $SiteCode = "P01"
    Import-SCCMCmdlets -SiteCode $SiteCode
    #>
    Param (
    [Parameter(Mandatory=$true)]
    $SiteCode
    $null = Import-Module ($env:SMS_ADMIN_UI_PATH.Substring(0,$env:SMS_ADMIN_UI_PATH.Length – 5) + '\ConfigurationManager.psd1')
    Set-Location "$($SiteCode):" | Out-Null
    if (-not (Get-PSDrive -Name $SiteCode))
    Throw "Beim Versuch das Powershell Modul zu laden und auf das PSDrive $Sitecode zu wechseln trat ein Fehler auf."
    The exact same function works when i copy it to the ISE and run it.
    Does anyone have any ideas and can point me into the right direction? (eventually different workspaces when the function runs from within the module or something like that?)
    Best regards
    Rolf

  • Steps for creating a new BAPI function module

    Hello experts,
    Can any one send me steps for creating a new BAPI function module , I got a requirement to do like this,but I dont have any clue about how to create.
    Please help !!!

    BAPI stands for Business Application Programming Interface.
    There are 5 different steps in BAPI.
    - Create BAPI Structure  
    - Create BAPI Function Module or API Method.  
    - Create BAPI object  
    - Release BAPI Function Module.  
    - Release BAPI object.
    Step1. Creating BAPI Structure:  
    - Go to <SE11>. 
    - Select Data Type & Enter a name. 
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module: 
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
       Goto -> Function Groups -> Create Group.
       Enter a name (Note: This name Must start with ZBAPI)
       Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
       Click on the Third ICON that says Inactive Objects. 
       Select the group that you just created and click on Activate. 
       Notice that the group you created will disappear from the list of inactive objects.
    - Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields 
      RETURN        TYPE        BAPIRETURN (These 3 field values are always same)
      Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object: 
    - Enter Tr.Code <SWO1>   (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details. 
    NOTE: Make sure that that Object Type and Program name are SAME.   
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom. 
    - Then hit <ENTER>. 
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu: 
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step. 
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    -  Now on a different screen goto TR.CODE <SE37>.  Enter Function Module name and select from the top menu  Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>. 
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully.
    regards,
    aswin

  • How to catch exception thrown from a function module?

    Hi all,
             When we are calling a function module from JSPDynpage setting some import parameters, If in some case an exception is thrown in the function module.  How can we catch the same exception in the JSPDynpage program?
    Thanks & Regards,
    Ravi

    Hi Ravi
                                    Try this
                                                try
                    Object retMsgs = output.get(bapiretrunmsgobject);
                      if(result != null )
    IrecordSet rmsg = (IrecordSet) result
                   catch(Exception ex)
                        printException(ex, "Error getting function result");
    Lemme know for any further questions.
    Regards
    Praveen

  • Error while trying to create a Universe on Function Module in IDT

    Hi,
    We are using BO 4.1 Support Pack 2. I am trying to create a Universe on Function Module. I created data foundation layer, but when I right click on the table and click on 'Show table values' it doesn't bring any data (and there is data available in that table). When I click on 'Check Integrity' it says 'Missing Primary key'. Please see the screen shot. Please let me know if any has any idea and I am doing something wrong? I really appreciate it.
    Thanks,
    Charvi.

    Hi Charvi,
    What type of database/application are you trying to connect? Are you getting any error message?
    Missing primary key message is just a warning and is not related to the issue.
    Cheers
    Mohan

  • Problem when creating Database (Database, OS and hardware Configuraiton included)

    Problem when creating Database:
    Below are the problems, which I faced during creation of database. I have mentioned both the problem separately. Plus the log file maintained by Oracle during installation. It might help in diagnosing the error. Plus a little conclusion with I turned up to.
    There are two problems, when creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Log File Showing Error :
    Result code for launching of configuration tool is 0
    Launched configuration tool Oracle Database Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.7\bin/jrew.exe -Duser.dir=d:\oracle\ora81\assistants\dbca\jlib -classpath ";C:\Program Files\Oracle\jre\1.1.7\lib\rt.jar;C:\Program Files\Oracle\jre\1.1.7\lib\i18n.jar;d:\oracle\ora81\jlib\ewt-3_3_6.jar;d:\oracle\ora81\jlib\share-1_0_8.jar;d:\oracle\ora81\jlib\swingall-1_1_1.jar;d:\oracle\ora81\assistants\dbca\jlib\dbassist.jar;d:\oracle\ora81\assistants\jlib\jnls.jar;d:\oracle\ora81\assistants\jlib\acc.jar;d:\oracle\ora81\jlib\help-3_1_8.jar;d:\oracle\ora81\jlib\ice-4_06_6.jar;d:\oracle\ora81\jlib\netcfg.jar;" DBCreateWizard -progress_only -responseFile NO_VALUE -createtype seed -numusers NO_VALUE -apptype NO_VALUE -cartridges NO_VALUE -options NO_VALUE -demos NO_VALUE -seedloc d:\oracle\ora81\starterdb -sid ora8i -orabase d:\oracle -clususer NO_VALUE -cluspswd Protected value, not to be logged -nodeinfo NO_VALUE -gdbName ora8i
    Invalid Exit Code. The following result code will be used for configuration tool: 1
    Configuration tool Oracle Database Configuration Assistant failed
    The datafiles will be copied from the CD to d:\oracle\oradata\ora8i. The Oracle Database Configuration Assistant will begin creating the database.
    An Oracle database will be created for you. The database name will be ora8i. The system identifier for the database will be ora8i. The password for the INTERNAL account will be ******, the SYS account will be change_on_install and the SYSTEM account will be manager.
    Log File of Installation:
    The above code is a part of the log file, which is generated by Oracle installer at C:\Program Files\Oracle\Inventory\Log\..
    I just pasted the part of code, highlighted is the code showing error with Oracle Database Configuration Assistant.
    Software & Hardware Configuration are as follow:
    Software:
    Database
    Oracle 8.1.7.0.0 (Oracle8i)
    Operating System
    Microsoft Windows 2000
    5.00.2195
    Service Pack 2
    Hardware:
    x86 Family 6 Model 8 stepping
    10
    AT/AT COMPITABLE
    260,400 KB RAM

    Dont't worry about that. Before you
    create a table(or view), it is wise to
    drop the table(or view) with the same name.
    If the name doesn't exist, of course there
    is an error message. See the following script:
    -------------------begin-----------
    drop table students cascade constraints;
    create table students (
    sid varchar2(5),
    fname varchar2(20),
    lname varchar2(20) not null,
    minit char,
    primary key (sid));
    --------------end-----------------
    Good day!
    null

  • Problem when creating Database with Database, OS and hardware Configuraiton

    Problem when creating Database:
    There are two problems, which I faced during creation of database. When creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Software & Hardware Configuration are as follow:
    Software:
    Database
    Oracle 8.1.7.0.0 (Oracle8i)
    Operating System
    Microsoft Windows 2000
    5.00.2195
    Service Pack 2
    Hardware:
    x86 Family 6 Model 8 stepping
    10
    AT/AT COMPITABLE
    260,400 KB RAM

    user563502 wrote:
    I am working on Solaris 8. What is Alert_SID.log? where can I find it?
    ThanksFor the responsible of the upgrade of Oracle database, not even know what Alert log is?
    to be honest with you, this is not your work.

Maybe you are looking for

  • Problems with calculation in table footer

    I'm working on a 'dynamic form' with an expandable table (i.e. the user presses a button to add a new row), there are cells in each row for beginning month & ending month, plus an autocalc total field containing the formula: "ending – beginning +1" (

  • Is IPhone messing up wireless network?

    Devices at home keep losing the wireless connection to my shiny new BT infinity hub (replaced once) and not finding it even when I input the correct password.  I'm getting the conflicting code error in wireless diagnostics report. I've got a macbook

  • QI INFO RECORD SHOULD UPDATE

    Sir, i created an QI INFO record for one material for not to make any inspection plan and i created a PO for 5000 qty with reg to same PO  i received 100 qty only remaining qty is pending. My question is that for reaming qty i want to create inspecti

  • Multiple XY graph

    Hi, in a control and simulation loop,  I am making an xy graph that combines data from two wires for the x values and data from two wires for the y values.  I have attached a picture of part of the code.  When I run using some variable it works ok (p

  • Bugs and Problems Galore

    I am so disappointed, I'm beside myself. Dual monitor support I can wait, thought I'm not happy. I have two monitors, I'd like to make use of that real estate to expand the panels a bit so I can see everything. Scrolling the panels is a huge waste of