HeLp: Filling an attribut via ABAP

Hi all,
Can anyone give an example of
ABAP code to fill an attribut via exits ? 
Thanks in advance,

Ashwin,
I'm willing to fill that attribut anyway I can, in transfer routine or in report or other way.
As I wrote I need suggestions 'cos I don't have experience doing such a thing before.
So what's the easiest and most efficient way ?
( To summarize the problem:
+
I use <b>2LIS_13_VDITM</b> extractor, where I have the order number as <b>OCOORDER</b> infoobject   
I reach the related <b>WBS element</b> via COORDER_0WBS_ELMT navigation attribut of 0COORDER.
That WBS element also exists in PROJ table in PSPID field.
What I need is to get project description from POST1 field of the same PROJ table.
So according to Roberto Negro's reply, I have to add an attribute to OCOORDER definition and then fill it via exit with ABAP code.+ )
Hope it's more clear now..

Similar Messages

  • Updating value of for taxonomy attributes via ABAP API

    Hi ,
    We have table Product hierarchy repository in that we have Products table and ProductHierarchy table which is of type taxonomy .
    The product hierarchy is assigned to each product as lookup taxonomy field.
    Can anyone please let me know how we can update the values assgined to the attribute throght ABAP API.
    Example we have the attribute called color which assigned to Product Hierarchy 'A' and this product hierarchy 'A' is attached to Material '111' and the attribute color will have value 'Blue' for material '111' now I want to update the value of color to 'Red' . How we can achieve this via the MDM ABAP API.
    Regards,
    Amar Kamat

    If your question is how to change the value of an attribute for a specific product this is the solution:
    Use IF_MDM_CORE_SERVICES->RETRIEVE( ) to retrieve the product record so that you have a populated structure of type MDM_PARAMETER. In this structure you will find the entry relating to the taxonomy field. The VALUE attribute of this line entry will be a reference to type MDM_TAXONOMY_ENTRY.
    At this point you will want to take the TAXONOMY_ENTRY_ID and TAXONOMY_TABLE_CODE of this structure to retrieve the attributes. Using IF_MDM_CORE_SERVICE->RETRIEVE_ATTRIBUTES( ) and the attributes mentioned before you will get the results into a table of line type MDM_ATTRIBUTE_INFORMATION_SL.
    Select the appropriate line from the result table based on the attribute name (ATTR_NAME). In the record of type MDM_ATTRIBUTE_INFORMATION_SL you will now want to select the appropriate line from the table found in field ATTR_FEATURE_DOMAIN. Find the appropriate attribute (in this case color) by VALUE_NAME and copy the VALUE_ID (type MDM_UNIQUE_ID).
    Now back to where we left off in the original record (MDM_PARAMETER), loop through the table found at field TAXONOMY_ATTRIBUTES of the MDM_TAXONOMY_ENTRY looking in ATTR_INFO for the correct ATTR_NAME. When the correct entry is found, update the ATTR_FEATURE_DOMAIN with the new VALUE_ID and viola, you've got a mdm record ready to be updated.
    Simply call IF_MDM_CORE_SERVICE-UPDATE( ) with the modified record and you've updated your attribute assignment.
    In short:
    Navigate to the MDM_TAXONOMY_ENTRY of the product record
    Retrieve the attributes from the corresponding taxonomy table and navigate to the unique ID of the desired attribute
    Navigate to the attribute within the record's MDM_TAXONOMY_ENTRY and update the VALUE_ID with the new unique ID
    Update the product record
    Regards,
    Brian Dennett

  • Attach Search Help to Context Attribute (WD ABAP)

    Hi,
    I'm fairly new to the ABAP WD technology. After I've worked out the provided tutorials I'am now encountered a problem on attaching a search help to an context attribute.
    The search help I would like to use has several exporting fields. Is there a possibility to dertermine which exporting field of the search help should be bound to the context attribute? As far as I recognized the system behavior it is every time the first exporting field.
    Thanks in advance and regards,
    Matthias

    Hi Matthias,
    It works the same as of within the good old Dynpro. If you use a structure and put (at least) the desired fields inside and attach that structure to the context node, the values of the exporting fields should be moved back properly.
    Best regards,
    Thomas

  • File to R/3 via Abap proxy -- need help

    Hello,
    I have made a scenario File to R/3 via Abap Proxy
    My Inbound Async Message Interface has Message Type -Emp_Rac_Detail_MT.
    Message Type has structure
    EmpID
    EmpName
    Age
    I have table in R/3 ZRACTABLE where I need to post data
    Fields in ZRACTABLE are
    EMPID
    EMPNAME
    AGE1
    Pls send me the code that I need to write in Async Method of Proxy
    that will put data
    Regards

    Hi Herry,
    First of all u have to write a Function module in R/3 ....for that i given u the code above.
    Now in ur inbount proxy in the implementation class u have to write code right???
    Here is the code...
    **** INSERT IMPLEMENTATION HERE **** ***
    DATA:
    lv_EMPID type EMPID,
    lv_EMPNAME type EMPNAME,
    lv_AGE type AGE.
    Convert Input Parameters
    lv_EMPID        =  input-Emp_Rac_Detail_MT-EMPID.
    lv_EMPNAME      =  input-Emp_Rac_Detail_MT-EMPNAME.
    lv_AGE          =  input-Emp_Rac_Detail_MT-AGE.
    call function 'ZEMP_RAC_FM'             /** thats ur function module name **/
        EXPORTING
        EMPID       =  lv_EMPID .
        EMPNAME     =  lv_EMPNAME.
        AGE         =  lv_AGE.
    endmethod.
    Regards
    biplab
    <i>*** give points if it hepls you!!!</i>

  • Input via ABAP Webdynpro  - Display data Adobe form

    Hi,
    My requirement is I will pass input via ABAP webdynrpo selection screen and I want to get output in ADOBE FORM.Do we have any blogs or tutorials ? BTW this will not be interactive form right?
    rgds
    vara

    Hi Vara,
    Do follow these steps:
    1) Goto SE80 and create a WDC.
    2) Create a main view, and in the view go to context, and create a node and an attribute in it to fill the values from WDA.
    3) Goto layout of the View, and create an inputfield UI element, and bind the attribute created in the context.
    4) Now create an Interactive form UI element and give some name in the Template source of that UI element.
    5) On press of enter, it asks you to create a new SFP, and say yes for that. Also choose context as the data source during that process.
    6) Now SFP tcode is opened for you to design the layout.
    7) Similarly desing the layout and bind the copied node from webdypro component.
    8) Save and activate the form.
    9) Save and activate the WDC.
    10) Create an application and test it.
    This completes the scenario mentiond by you..
    I Hope it helps you.
    Good day!
    Regards,
    Shashikanth. D

  • Send a mail via ABAP program

    Hello Experts,
    I want to send mail via ABAP program with the following requirements :
    1. Recipient is OUTLOOK email -id
    2. Sender address has to be an external email-id
    3. Send mail as CC and BCC also to other email-id.
    Is there any function module which can satisfy all the above requirements.
    Regards,
    Mansi.

    hi,
    this code will definately help you just go through it:
    firstly  exported the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    regards
    Rahul sharma

  • Overriding attributes in ABAP objects

    Hello,
    I currently want know if it is possible to override attributes in ABAP objects. i know it is possible with methods. I have extend a previous class functionality and want to change the refrence type of an attribute from the parent class, but only on the child. Is this possible in ABAP object or even in normal object oriented techniques.
    Thanks
    Brendan

    Hi,
    ususally you can achive this with other technics. You can e.g. use the class hierarchy for this:
    The attribute is of type REF_SUPERCLASS. Within the superclass it should be working when you set subclasses of REF_SUPERCLASS as attribute.
    Another way is to use interfaces as reference type for your attribute.
    Please refer to [ABAP Objects|http://help.sap.com/saphelp_nw70/helpdata/EN/ce/b518b6513611d194a50000e8353423/frameset.htm]. Especially the chapters about Inheritance and Interfaces.
    Regards Rudi

  • Adapter specific message attributes in ABAP proxy

    Dear all,
    i have a short question. I have a file to ABAP server proxy scenario. When picking up the file i write communication data from the adapter in the message header using dynamic configuration and route the message to a abap proxy.
    My question is: Do i have access to the header data in the proxy, or do I have to make a message mapping and put the header data into the payload of the message?
    Kind regards
    Florian

    Hi,
    here is a blog about your scenario:
    File to R/3 via ABAP Proxy
    Hope it helps.
    Regards
    Patrick

  • Push data from BW 3.5 to XI 3.0 via ABAP proxy

    Hi,
      I have the following scenario: I´m in BW 3.5 trying to send data to XI 3.0 via ABAP proxy. I´ve already found a "How-to" to do build this scenario, but something does not work. I think that problem is when a try do the logon from BW to XI because I got the message "logon data not provided" on http service in XI. I´ve already configure an RFC Destination(SM59) as R/3 connection(type 3) and another as HTTP connection to R/3(type H) and both are correct. Someone knows where I configure the user/pass to logon from BW Intergration Server to XI Integration Server?
    Regards,
    Rafael Soares

    Hello fellows!
       I discovered that my problem was configuration on SXMB_ADM transaction.
       Thank you very much for your help!
    Best regards.
    Rafael

  • How to get the file on the content server via ABAP

    Hi
    We are working on an abap that should download certain files stored on the content server and store them on a different file location using  GUI_DOWNLOAD. How can we retrieve the files (PDF's) via ABAP from the contentserver?
    Hope someone can help
    Cheers

    Hi,
    I think the DMS BAPIs could be useful here. For example you can use BAPI Document_CheckOutViewX or Document.CheckOutView2. You will find the documentation for these BAPIs in transaction BAPI under subtopic 'Cross-Application-Components'.
    Further maybe the information in the SAP note 504692 and 796709 could be useful too.
    Best regards,
    Christoph

  • How to create a dynamic file via ABAP

    Hi all,
    We have a requirement of storing all internal table data into a temporary file in application server and later the same file will be passed as an input to shell script to meet our business requirement. Here I'm not sure how can we create a temporary file at run time through abap . I'm sure this is certainly possible via Java, Can any one suggest me how temporary file will be create via abap. Also please note that developer shouldn't give this file name any where from selection screen and system itself should create a file with certain name.
    Please advise.
    Thanks

    Hope this helps: [Working with files |http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles#Workingwithfiles-Workingwithfilesontheapplicationserver] you need to use open dataset stmt to create files in app server..
    if you check the open dataset stmt in any examples in net, you will find the file name which is of type string... to generate a dynamic file name all you need to do is to build the file name dynamically say by using concatenate statements..
    concatenate 'PROGNAME' sy-datum sy-uzeit into <filename>.
    open dataset <filename> for input .

  • Attachments via ABAP Proxy

    I have come across one client requirment where he needs to send the txt/pdf file as an attachment from R/3, currently that interface is using the ABAP Proxy, is there any idea about How to send the attachments via ABAP Proxy?

    Hi,
    Refer
    XI: RFC or ABAP Proxy ? ....ABAP Proxies with attachments
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    Problem sending xls file in an attachment via ABAP proxy
    Receive mail with PDF attachment into XI and send to ABAP proxy
    http://help.sap.com/saphelp_nw70/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm
    Thanks
    Swarup

  • Custom user attribute from ABAP to Portal UME

    Hi All,
    We have choose the ABAP as the data source for portal UME. We have a custom user attribute in the abap. Now i want to bring that custom user attribute from abap to custom user attribute in the UME.
    Any help will be rewarded.
    Thanks
    Sarang.

    Any resolution to this issue?

  • Esacping in XML via ABAP CL_IXML functions?

    Hello Partners:
    I was going through some work of XML integration of SAP with a third-party. But came across an issue:
    The text descriptions we are sending within an XML tag has certain special characters like '&'. But the XML parser is not escaping it. Hence its replacing '&' with '&' in the XML data string. So now I need to understand how can we implement escaping via ABAP for generated XML strings? Can you all please help me to understand which methods to use and how?
    It will be much appreciated.
    Thanks in advance.
    Vivek Singh.

    Hi,
    It got escaped in this message I posted!
    The issue is "&" being replaced by "& a m p ;". Please ignore the spaces in the latter, I have put it purposely to avoid the 'amp;' from being escaped when the browser parses this message.
    Thanks.

  • Assign resource to task via abap automatically

    Hi experts.
    I need to assign via abap a resource to a task.
    The scenario is the following:
    I have a RoleA with 4 resources staffed (Resource1, Resource2, Resource3, Resource4) and 2 tasks assigned (Task1, Task2).
    I need to assign for example Resource1 to Task1 via abap knowing:
    - Task1 guid
    - RoleA guid
    - Resource1 business partner guid.
    How is it possible?
    Is there a function module or a method to do this?
    Thanks,
    Luca

    Luca;
    I never used this functionality.
    This "Resource" tab strip that you mentioned used the Object BUS2177.
    I found this BAPI's:
    BAPI_BUS2177_CREATE
    BAPI_BUS2177_CANDIDATE_ADD
    BAPI_BUS2177_STAFFING_ADD  (this BAPI may helpyou)
    Explore with this, I think that you are closer to solve this thread.
    Hope this help you.
    Best regards,
    Mariano.
    PD: Points will be apreciated.

Maybe you are looking for

  • Cannot send email from outbox

    Why can't i send email from my outbox? Mail is blocked from coming in also.

  • My iPhone 5 is no longer visible to my PC via Windows Explorer

    My iPhone 5 (running iOS 8.02) is no longer visible to my PC (running Windows 7) via Windows Explorer. In the past, I have been able to see the phone listed as a Device in Windows Explorer when connected via USB cable, and could navigate to the DCIM

  • Aperture or Photoshop Elements?

    I am an amateur photographer and photography is a keen hobby of mine. I have recently been pondering the idea of purchasing a photo-editing package from the app store and have come across both Aperture and Photoshop elements. I enjoyed using iPhoto b

  • XLSX Excel import is throwing GenericFileManager.verifyFileType error

    Hi All, When i tried to import data from XLSX Excel file with OAF its working at local,but when its running in apps throwing following error Unexpected exception caught: java.lang.NoSuchMethodError, msg=oracle.apps.fnd.gfm.GenericFileManager.verifyFi

  • Open Office in SAP

    Dear All, In ALV Grid, there is a option for spreadsheet in place (CtrlShiftF7). ie.,the list is being displayed in Excel screen within SAP environment (Provided, VBA should be enabled in Excel). Our requirement is to do the above process in Open Off