Copy Function using ABAP Exit Function

Hi Experts,
I am trying to write a copy function using Exit Function (ABAP Code) for BPS-BW. Can anyone suggest me any how-to document provided by SAP for this purpose which mentions the standard steps as well as exactly where to change if I want to change some characteristics values. e.g. I would like to copy from one submission to another, so I would like to change the values of the characteristics SUBMISSION.
Points will be rewarded.
Thanks in advance

Or alternatively you can suggest me, what changes do I need to make in the following code if I want to append to the xth_data rather than replacing the values. I want to use it for copy purpose to want to add extra record in the cube with modified characteristic value rather than replacing the first with the second.
""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_PARAM) TYPE  UPC_Y_PARAM
*"     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: <ls_data> TYPE ANY,
<ch_struct> TYPE ANY,
<cl_coorder> TYPE ANY.
LOOP AT xth_data ASSIGNING <ls_data>.
now <ls_data> points to a line of xth_data and can
be used to reference each characteristic and/or
keyfigure contained within.
choose first structure which contains the characteristics.
ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO
<ch_struct>.
*Assign fields for value assignment in the record (ls_data)
choose the characteristic '0COORDER' (use uppercase)
ASSIGN COMPONENT '0COORDER' OF STRUCTURE <ch_struct> TO
<cl_coorder>.
*<cl_coorder> now contains the value of the internal order in the
*record...
*Make the changes in the values
<cl_coorder> = '2'.
When I am changing <cl_coorder> value to '2', I want it to get appened to xth_data as an additional record. That means the earlier <cl_coorder> value must be available in the cube as it is. What changes do I need to do in the code, please suggest.

Similar Messages

  • Inserting records in the ABAP exit function (hashed table XTH_DATA)

    Hi all,
    I want to add records in the logic of an ABAP exit function. Due table XTH_DATA being a hashed table the normal insert or append is not possible.
    My logic MUST move the data to a temporary table (ITAB) where the logic is executed (modifying KYF values and creating new records.
    In order to quickly get to a result I have solved the problem in an awful way through hardcoding the structure of ITAB to be the same as XTH_DATA is in this specific case.
    I would like to know if someone has an exmaple of a nice way to dynamically create an ITAB with the structure of XTH_DATA?
    At the end it should be possible to do: XTH_DATA[] = itab[].
    Greetings,
    Martin

    Hi Martin,
    the only way I know is to solve this problem with sort of pointers, field symbols. Roughly spoken the idea is you lookup the structure of xth_data in table dd03l. you define an internal table of type any. you loop around your xth_data table and assign the value of each column of xth_table to your internal table. then you do your your adding. Hopefully then you can simply assign xth_data to your itab.
    regards,
    Jürgen

  • How to access BPS variables in ABAP Exit Function

    Hi Experts,
    I am using a Exit Function. My BPS variables contain multiple values. I want to trasfer then (may be directly read) to an internal table from where I can loop over then.
    Could you please suggest me the code for this?
    Points will be awarded.
    Thanks in advance,
    Shiwesh

    Did you try using the FMs API_SEMBPS_VARIABLE_GETDETAIL or Z_VARIABLE_GET_DETAIL for this?

  • Excel Save As functionality using ABAP

    Hi Gurus,
       I have an Excel file on Presentation server. I need to save this file in specified directory in Presentation server (Means Save As functionality). How can I do it in ABAP.
    Is there any API available. Could you help me on this.
    Thanks,
    Rayudu

    Hi,
    To upload the Excel file, please refer this thread :
    Re: Upload excel file
    To download the Excel file on application server, please refer this thread :
    Excel download in Application Server
    To summarize :
    You need to use GUI_UPLOAD to upload the excel file and need to use FM MS_EXCEL_OLE_STANDARD_DAT to download the excel file on application server.
    Best regards,
    Prashant

  • ABAP/exits,function module

    Iam new to ABAP. No Idea abt Exits & Routines and fnction modules.
    How to use CMOD to do enhancements.
    Can anyone pls help me step by step.
    I'll be greatful for your reply.
    Pls send me if u have any documents which explains clrealy. And also any step by step screen shorts are appreciated. 
    [email protected]
    regards
    pj

    Hello Pankaj,
    Please go through these links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
    Enhancement
    User exit
    Regards,
    Praveen

  • What is Supply Function, use of Supply function?

    Hi Guru's,
    Can you give a definition or description of Supply Function, and what is the use?
    Thanks,
    Pradeep.

    Hi Pradeep,
    Okay, conceptually you have understood it, that is good
    Hope you have also, visited this link
    Supply function with singleton concept | Webdynpro ABAP
    Then let us have a simple example to understand how it works.
    Let us say we have  parent node PNODE & child node CNODE
    PNODE node has 2 records and for each record CNODE has 3 records
    Whenever the data of PNODE is bound/changed, the supply function of CNODE executes. Hence, you are able to get the control during initialization.
    Now, if you have set the lead selection at line 2, i.e.  there is change to context PNODE, hence the supply function of CNODE triggers and it gets the reference of 2nd record in PARENT_ELEMENT inside supply function and based on this the child node data can be populated.
    Even, if you refresh node PNODE using method lo_pnode->INVALIDATE( ), the supply function of CNODE triggers.
    Hence, whenever there is change at PARENT'S context node, the supply function of its child node(s) gets called.
    Hope it gives little light on the supply function's  practical usage.
    Regards,
    Rama

  • How to access reference data in BPS Exit Function

    Hi Experts,
    Can any please tell me how to access reference data in BPS Exit function. I am creating a copy function using ABAP Exit Function (Std copy and fox formula doesn't work for my requirement).
    Please suggest,
    Thanks in advance,
    Shiwesh

    Hi Deepti,
    Thanks a lot for your reply. xth_data contains all the data based on package filteration. Let me explain you,
    Say, I have a characteristic char and whose value is 'A', I want to change it to 'B' in my copy function, while keeping the original record with 'A' as well. So now I want my xth_data to contain two records, one with A and other with 'B'. I mean to say from value is 'A' and to value is 'B'. Now my package contains 'B' (the to value) as the allowed value, but not A because in the package I am setting this using a BPS variable. There are two types of variables, one is to variables other is from variable. There could be two scenarios,
    1. If I set from varibale in the package: if I do so, I will have the data in xth_data containing 'A' as char value. But in this case when I change it to 'B' and try to save both the records, package won't recognize the record with value 'B' and reject it.
    2. If I set to variable in the package: In this case the xth_data itself will not contain anything and I can not loop over xth_data because there is no record with 'B'. Only record available in the system is with 'A' values.
    That is why I am thinking about having reference daya somewhere. I could loop over reference data and then pass it to xth_data. Package will contain to variable so it will allow all my modifications to get saved.
    Thanks and regards,
    Shiwesh

  • ABAP RFC Function to merger table data?

    Hi All,
    Has anybody tried to merger that from multiple table in 1 table using ABAP RFC function module.
    I have to merger 3 table into 1 which I am not able to do using Combine or Union operater.
    One solution suggested in the below thread by Marcel was to use ABAP RFC function mod..I dont know how to do that.
    If anybody has tried please share.
    Union operator between tables
    Thanks,
    Murtuza.

    Thank you for the reply,
    I got the solution without ABAP code.
    I created a structure of table (Key Figures) in Column of query designer and then use that structure in VC to output table.
    There I had used formula for each KeyFigures using IF ...something like this:-
    NVAL(IF(@Key_Figures=="Prior Sales",0,IF(@Key_Figures=="Price",NVAL(IF(#ID[ACA257]@Price_Impact_value>=0,#ID[ACA257]@Prior_Sales_Value,#ID[ACA257]@Prior_Sales_Value+#ID[ACA257]@Price_Impact_value)),IF(@Key_Figures=="FX",#ID[ACA257]@GAP_3,IF(@Key_Figures=="Volume",#ID[ACA257]@GAP_4,IF(@Key_Figures=="Lost Mix",#ID[ACA257]@GAP_5_6,IF(@Key_Figures=="Gain Mix",#ID[ACA257]@GAP_5_6,IF(@Key_Figures=="Current Sales",0,123))))))))
    This way I got the output table as required.
    Pls see this thread for the requirement.
    link: Table with Formula Values as output table?

  • Calling DLL function using LabVIEW 7.1?

    Here's the scinario:
    I have LabVIEW 7.1 and i'm trying to call a DLL function using 'CALL LIBRARY FUNCTION NODE'.
    I have used this in the past with no problem. But right now, when I use this node and link it to the
    library and function name, i get 'ERROR loading Dllname.dll' message.
    NOTE that the DLL is generated using VStudio2003 or VStudio.NET. Could this be a problem??
    Also, i noticed that there are some JUNK characters before & after the function name that show
    up in function prototype:
    long ?EcpvsSign@@YAHHPBEH0HPAE1@Z(long Signer, CStr NonRMsg, long NonRMsgLen,
    CStr RMsg, long RMsgLen, CStr SigR, CStr SigS);

    tbd wrote:
    Hi rkpat,
          You might check-out this thread on building WIN32 DLLs - expecially the bit re: "mangles names" under the paragraph titled "C Language Source File".  My recollection is that 'extern "C"' directive in the header file for the DLL solved the name-mangling problem, but it's been a few years!
    Cheers!
    Message Edited by tbd on 03-01-2007 11:19 PM
    tbd is right. You have to first disable name mangling as it creates all kind of troubles. Other issues might be that your Visual Studio 2003 or .Net edition links in dynamic runtime libraries that are not standard available on every Windows PC so that you need to redistribute the according runtime library installer together with your app for the DLL to be even loadable.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • DMEE  - How to supress tags with no values – Using Module exit

    Hi,
    I have created a payment format tree using transaction DMEE The problem is, when I don’t have
    any values in a tag, I don’t want to display the tag for that particular node.
    I am using Exit module mapping procedure, so I can’t add any condition. (See attached image)
    Could you help me , please?
    Thanks a lot in advance.
    Best regards.
    Ana

    Hi Shannon,
    I understand that it is possible using conditions tab of the given node.
    Can you exactly tell me the condition that you used?
    I am using some exit function module to populate my node.
    So what should be the condition that I should put there to chck that the value fetched from the exit FM is not blank?
    Thanks a lot for your help.
    Regards,
    Suganya

  • Why should we using ABAP code in RSQ02

    Hi,
    I want to know why should we using ABAP cobe in RSQ02 ,
    while we creating the infoset we writing code using extras icon .
    with out abap code we can't creat infoset query in SAPBW?
    Regards,
    Goodyear.

    Hi dear,
    this is only an additional possibility to manipulate your data, but this is not due !
    Did you know that Marc Bernard wrote a very useful doc about ABAP and BW ?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/bw-and-portals-05/five ways to enhance sap bi backend functionality using abap.pdf
    Hope it helps!
    Bye,
    Roberto

  • Document copy@cell with EXIT function

    hi experts,
    we are doing document created @ cell level in a version and doing version to version copy.
    we are using fox formula for normal data copy,which is working fine,
    we are trying to copy the documents @ cell level from old version to new version after data copy, by using SAP recommended EXIT function.
    we are using UPF_DOC_COPY_EXIT and UPF_DOC_COPY_INIT modules.
    but they are taking lot of time like more than 1 hour.we are terminating the process in between.
    is there any way we can copy the documents.
    thanks in advance,
    sajeevan.

    hello guys,
    for the above EXIT function.if i hard code the values instead of variables in the parameter group, it is executing in less than 30 secs. but the notes are not copied.
    but, if i use variables it is taking lot of time and also not executing.
    any suggestions?
    thanks in advance.
    regards,

  • Using iPad mail program I have a draft of an email. I attempted to "cancel" and "delete draft" but it is still on my screen even after shutting down and restarting. How do I exit so that I can use other mail functions?

    Using iPad mail program I have a draft of an email. I have attempted to "cancel" this and "delete draft" but the email stays on my screen. How can I exit this so that I can use other email functions?

    Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • How to use RTRIM function in ABAP

    Hey,
    I have a question on using trim function in ABAP. According to all documents, I should be able to use rtrim as
    shorttext = rtrim('abcde-xx', '-xx').
    But when I do that, it gives me an error message "Comma without preceding colon (after shorttest?)"
    Anyone can tell me why is this happening? how should I use this trim function? And for me to cut off variable's last few character, what else method can I use? 
    Thank you very much.

    DATA : T1    TYPE STRING VALUE 'abcde-xx',
                T2    TYPE STRING  VALUE '-xx'.
    REPLACE T2 INTO T1 WITH SPACE.
    WRITE :/, T1.
    result output is :    'abcde'.
    regards
    Guna

  • IP - Is it possible to call exit planning function from ABAP Report..

    Hi All,
    Greetings.
    Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
    If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
    Or if somebody has done in BPS, appreciate if it can be shared too .
    Thanks a lot and have a good day,
    Best regards,
    Daniel N.

    Hi.
    You can achive this as suggested by Mattias in your previous post.
    Lets say you have next data structure:
    CostCenter | Amount | PercentForDistibution |
    Create input ready query in this format. Restrict cost center by variable type range.
    Create WAD with analysis item.
    When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
    I assume you have data only for 101004 in your cube (lets say 1000).
    You will see only one record in your webpage.
    CostCenter | Amount | PercentForDistibution |
    101004       | 1000     | NOTHING
    When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
    Just add 6 new records:
    CostCenter | Amount   | PercentForDistibution |
    101005       | NOTHING| 10
    101006       | NOTHING| 30
    101007       | NOTHING| 20
    101008       | NOTHING| 25
    101009       | NOTHING| 5
    101010       | NOTHING| 10
    Then run planning FOX function like this:
    FOREACH Z_COST_CENTER.
    IF {Amount, Z_COST_CENTER} <> 0
    Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    FOREACH Z_COST_CENTER.
    IF {PercentForDistibution Z_COST_CENTER} <> 0.
    {Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    It is not perfect FOX, but as an idead, it should work.
    Regards.

Maybe you are looking for

  • Error when transporting 0MATERIAL Infoobject to Production server

    Hi, When I am transporting 0MATERIAL to production I am getting this error "Start of the after-import method RS_IOBJ_AFTER_IMPORT for object type(s) IOBJ (Activation Mode) An exception with the type CX_RS_SQL_ERROR occurred, but was neither handled l

  • Save as PDF' splits MS-Word Sections into separate PDFs

    This is more of an FYI than a question, Original topic: http://discussions.info.apple.com/message.jspa?messageID=8068226 it has already been archived and I can't reply to it. Problem description: when printing a single work document to PDF two PDF fi

  • Multi Page Application

    Hi.. Im going to develop a enterprise level multipage application. What is the best way to handle this multipage in flex ? What about Stackview and state ? what are the advantages and disadvantages of these ? Best Regards Amila

  • Automating Final Cut Express using AppleScript?

    Hello, just another question: is it possible to use AppleScript (or something similar) with Final Cut Express? And if so, where to find a good reference? I have some DV movies and a for each a csv containing the In and Out Points for the subclips, in

  • Overlapping SpryMenu in MS Explorer

    Hey guys, I am new to DW CS3 and have made a site with spry pull down menus which are finally working correctly as viewed in Firefox. When I view it in MS Explorer 7 the 'bodycopy' div views as in front of the menu pull downs and keeps the mouse form