Customer field account assignment - F4 - search help exit

Hi all,
I have a question with regard to a F4 search help exit I'm try to build for a new CUF in the account assignment (include INCL_EEW_PD_ACC_CSF).
I've successfully created everything (search help + F4 search exit (read R/3 table)), but when I want to include restricted the search with certain filter values entered on the screen I'm stuck.
I tried to achieve this by passing the parameters entered on the search screen to the RFC read table function, but in fact I'm not able to read the <b>screen values</b> (using 'DYNP_VALUES_READ'):
CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = lc_dyname_1
          dynumb               = lc_dynumb_1
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = li_fields_filter
I'm always getting an invalid dynpro error (I've tried passing SAPLBBP_PDH_ACC, SAPLBBP_SC_UI_ITS, SAPLBBP_CUF,...).
Does anybody know how I can include de filter values of my search screen in my search ?
Thanks in advance,
Kristof

Hi
Which SRM version are you using ? What's your detailed requirement ?
<b>You need to call these function modules inside your search help exit to fetch the user-entered value and then process it accordingly as per your requirements.</b>
<u>Please go through these function modules.</u>
*--- Get the user-entered fieldname
<u>    CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'</u>
*--- Map the Results
<u>    CALL FUNCTION 'F4UT_RESULTS_MAP'</u>
<b>Other related links -></b>
Re: Search helps - CASE sensitive
Re: Search Help - format problem
Hope this will help.
Regards
- Atul

Similar Messages

  • Custom Field in Account Assignment with search help functionality..

    Hello friends,
      I have added a custom field(Profit Center) in account assignment frame which is having search help also attached..
      the data for search help read from R/3.. When i click the search help in WEB , I got an error message saying that 'No input help available ( Search help PRCTR_EMPTY is empty )
      Any one have found this kind if issue?
    please help out
    Regards,
    john.

    Hi
    You can create a custom search help (simialar to R/3 srch help for profit center) and create a corresponding search help exit for this purpose.
    You need to call the R/3 table from SRM to get the required data and then map the data in to the search help fields.
    Hope this will solve ur problem.
    Regards
    - Atul

  • What is the significance of data collection nad search help exit field ?

    Dear Gurus
    I  know i am asking very basic quetion of abap but sdn is  the only source to learn sap for me.I want to thanks you all for your kind support.
    i read  most of the post related to search help and trying to create one.
    for elementary search help.
    SE11 -> SEACH HELP -> ELEMENTARY SEARCH HELP
    I have doubts regarding to fields "DATA COLLECTION" and "SEARCH HELP EXIT".
    reference to a  tutorial it is a maintenance view  shall i  have to reate  a maintenace view first.
    and other field is  SEARCH HELP EXIT what is this.
    please help me .
    Thanks in advance.
    Chitta Ranjan mahato.
    Edited by: chitto123 on Oct 8, 2010 5:59 AM

    Howdy,
    DATA COLLECTION - refers to a database table or view.  This is the data that the search help will search through and display based on the parameters provided, so you can create your own view for the search help if you want the search to cover multiple tables.
    SEARCH HELP EXIT - You can create a function module to be able to alter the Search Help's selection and results at various events throughout the search help.  An example of this function module is provided with some documentation in function module F4IF_SHLP_EXIT_EXAMPLE.
    Cheers
    Alex

  • Search Help exits using Web Dynpro abap

    Hi,
    Before returning the values selected by the user to the input field, i have to set a column of the F4 result list based on some computation. How can i do that?
    i.e to set a field value dynamically using search help exit
    plz reply.
    Thanks & Regards,
    Raji.

    Hi Raji,
    The blog mentioned by micheal is written by me.
    Go through the blog and let me know your queries.Lets see if i can help you

  • How to create Search help exit, and then assign it to a collective search

    hi gurus,
    i have an intersting question for you, well my scenario is like i have to create a search help exit using some function module cause i didt found table for my search help but i can find the value through FM, i know we can create a search help exit and then assign it to collective search help,
      my problem is what are the parameters i need to pass to this search help exit FM, and in the function module i want to use the value entered on the f4 selection screen to extract data through FM. i need to give a solution  asap.
    any reply will be highly appreciated
    n rewards points for sure.
    thanks mandy

    Hi mandy,
    Have a look at this code,
    FUNCTION SHLP_SHOW_LIST.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(PLANT) TYPE  WERKS_D OPTIONAL
    *"     VALUE(DISPLAY_ONLY) TYPE  FLAG OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(ITEM_SELECTED) TYPE  CHAR20
    *"  EXCEPTIONS
    *"      POPUP_CANCELED
    TYPE-POOLS SHLP .
    CONSTANTS:
            co_shlpname            TYPE shlpname   VALUE 'SHLP_CONTAINER',
            co_shlpfield_itemalias TYPE ddshlpsfld VALUE 'CONTAINER'.
      DATA: l_shlp         TYPE shlp_descr_t,
            l_subrc        TYPE sysubrc,
            l_return_tab   TYPE STANDARD TABLE OF ddshretval,
            l_return_wa    TYPE ddshretval,
            l_interface_wa TYPE ddshiface.
    Get details for search help
      CLEAR l_shlp.
      l_shlp-shlpname  = co_shlpname.
      l_shlp-shlptype  = 'SH'.
      CALL FUNCTION 'DD_SHLP_GET_HELPMETHOD'
           CHANGING
                shlp = l_shlp.
    Assign virtual screen field
      READ TABLE l_shlp-interface INTO l_interface_wa
      WITH KEY shlpfield = co_shlpfield_itemalias.
      l_interface_wa-value      = space.
      l_interface_wa-valtabname = 'X2'.    "virtuel screen field
      l_interface_wa-valfield   = 'Y2'.    "virtuel screen field
      MODIFY l_shlp-interface FROM l_interface_wa INDEX sy-tabix.
    Call F4 popup
      CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
           EXPORTING
                shlp          = l_shlp
                disponly      = display_only
           IMPORTING
                rc            = l_subrc
           TABLES
                return_values = l_return_tab
           EXCEPTIONS
                OTHERS        = 0.
      IF sy-subrc = 0 AND l_subrc = 0.
      Value selected
        READ TABLE l_return_tab INDEX 1 INTO l_return_wa.
        item_selected = l_return_wa-fieldval.
      ELSE.
      Popup canceled / no value selected
        RAISE popup_canceled.
      ENDIF.
    ENDFUNCTION.
    make sure to call these FMs and populate accordingly...
    Thanks
    Madhu

  • How to concatenate fields in Search help exit

    Hi,
    My requirement is i have to create a search help for a field in cj20n transaction.
    when i press f4 on that field i should get a popup of 4 fields from custom table,when user selects any 1 row,
    first 3 field values should be concatenated and appear in screen field . in search hlp i added 1 more field so that i can concatenate
    all 3 field values and place in it.I can use  search help exit so i can concatenate but there are steps like selone,presel etc i am not able to understand .
    I saw some examples in wiki, but not able to understand what to do for my requirement.
    regards.
    Edited by: vnamamala on May 27, 2010 12:22 PM

    You would use the step 'SELECT' to control the data selection into an internal table.  You would use the step 'DISP' to map the records in the internal table to the search help record table.  In your case, I would already have a field in the internal table with the values concatenated together prior to the hit list display (do this in SELECT step) which is not displayed in the hit list but is flagged as the EXPORT field in the search help definition; otherwise just put the field at the end of the hit list. 
    Map your results in DISP as follows:
    *   Map the internal table to RECORD_TAB
        CALL FUNCTION 'F4UT_RESULTS_MAP'
             TABLES
                  SHLP_TAB          = SHLP_TAB
                  RECORD_TAB        = RECORD_TAB
                  SOURCE_TAB        = GT_DOCUMENT
             CHANGING
                  SHLP              = SHLP
                  CALLCONTROL       = CALLCONTROL
             EXCEPTIONS
                  ILLEGAL_STRUCTURE = 1
                  OTHERS            = 2.
        CALL FUNCTION 'F4UT_OPTIMIZE_COLWIDTH'
             TABLES
                  SHLP_TAB    = SHLP_TAB
                  RECORD_TAB  = RECORD_TAB
             CHANGING
                  SHLP        = SHLP
                  CALLCONTROL = CALLCONTROL.

  • Modify another field value in search help exit.

    While creating the Sales Order, the user does an f4 on ship to party to determine the sold to party ( search help exit ), now I have the values of both the Ship to customer and Sold to customer in the search help exit, but I can update only the ship to field of the sales order, do you know how I can modify the sold to value on the screen.
    I tried setting up the parameter id 'VAG' in the search help exit with the determined value, but this value is not getting copied in the Sold to party field once the search help is executed.
    The other option which is left is export to memory and import to memory in another user exit of VA01. Is there any other alternative? Also which program do I need to do the import of memory so that sold to party is displayed on the initial before saving the document ?
    Ajay

    Hi,
    Yes..Try calling from the search help exit..
    You have to pass the program name and screen number..
    In the internal table parameter DYNPFIELDS..
    Pass the fieldname and fieldvalue...
    Thanks,
    Naren

  • Modify va01 fields in search help exit.

    I have implemented the search help exit for Ship to field , based upon the values of ship to field , I need to modify the Sold to field during Sales Order creation.
    Can this be achieved ? If yes how ?
    Ajay

    Hi Ajay ,
    1.     go to ship to party data element KUNAG as below:
    And assign shearch(NEW) help name: Z_KUNNR
                                            Parameters : CUS
    2.     then create search helps:-
    2.1.     Search help name : Z_KUNNR(any name as per your standerd)
    2.2.     Short Text : Search Help for Kunnr.
    2.3.     Search Help Exit : Z_sold_to_party_F4HELP_EXIT(Fuction Module)
    2.4.     Other Attributes of Search help are as follows:
    Search help parameters:
         CUS  TYPE  kunnr , DESCRIPTION  TYPE     BEZEI40 .
    SPOS (Selection Position)     NA
    LPOS (Listing Position)     CUS  --  1,       
                                                    DESCRIPTION -- 2.
    Export Parameter     CUS .
    Import Parameter     NA
    Dialog Type     Display Values Immediately.
    Selection Method     NA
    2.5.     2. Create fuction module: Z_sold_to_party_F4HELP_EXIT Below are the details of the Function Module Attributes, Import , Export and Changing Parameters, Tables and global data (Goto -> Global Data )
    Proceesing Type:      Normal Function Module,                
    Start Immediate.
    Edit Lock     NA
    Global Data     TABLES:  specify the table from where you are going to get the Sold to party values
    Import Parameters      NA
    Export Parameters      NA
    Changing Parameters        SHLP          TYPE     SHLP_DESCR_T,
                                                CALLCONTROL  LIKE     DDSHF4CTRL,
    Pass value (Check Box ) Checked for both Parameters.
    Tables      SHLP_TAB       TYPE SHLP_DESCR_TAB_T,
    RECORD_TAB       LIKE     SEAHLPRES,
    2.6.     
    2.7.     Source code Logic Implementation :-
                   Select the sold to party value from table into struct_record_tab-string .
                   Aftere that goto user exit FORM USEREXIT_MOVE_FIELD_TO_VBAK or
    FORM                                                             USEREXIT_SAVE_DOCUMENT_PREPARE.
                  And add logic to assign sold to party value to the value to ship to party
    Thanks and Regards,
    Pavan

  • Adding a new field to the search help exit

    Hi friends,
    adding a new field to the search help exit. How does it work ?
    Thanks in advace
    Ilhan

    The search help exit allows you to modify functionality of search help. If you add a new field to the
    parameter list that is not contained on the selection method you can manually populate it within the search
    help exit.
    This  would be performed within the u2018STEP DISPu2019 section. Once within this section all search help
    data has been retrieved and is stored in table RECORD_TAB (record_tab-string) as one long string value.
    Therefore you need to read table SHLP in-order to locate position of value within string.
    Example:
    To find position of personnel number (PERNR) within elemenory search
    help M_PREMN you would use the following code:
    Loop at record_tab.
         read table shlp-fielddescr into wa_shlp
                                       with key tabname   = 'M_PREMN'
                                                fieldname = 'PERNR'.
    You could then use this information in the following way, for
    example, to find a persons organisation unit:
          select  orgeh endda
            up to 1 rows
            from pa0001
            into (ld_orgeh,ld_endda)
           where pernr eq record_tab-string+wa_shlp-offset(8)
                                                      u201Cpernr length is 8
           order by endda descending.
          endselect.
          select single orgtx
            from t527x
            into ld_orgtxt
           where orgeh eq ld_orgeh and
                 sprsl eq sy-langu and
               ( endda ge sy-datum and
                 begda le sy-datum ).
    If you have added a new field to the end of the parameters list
    the next step is to populate it by adding this data to the end of
    the record_tab string:
      concatenate record_tab-string ld_orgtxt into record_tab-string.
      modify record_tab.
    endloop.

  • Custom search help exit through stand search help SD_MAT1

    Dear Experts,
    How to prepare custom search help through stand search help(SD_MAT1).
    My requirement: In VA01 transaction, material(matnr) search help, adding custom search help.
    Regards,
    Abbas.

    Dear Abijith,
    How to write custom search help(FM) code with parameters and how match with search help parameters in search help exit.  Please give some sudo code.
    Regards,
    Abbas.

  • Search help exit for field name: BANKL (bank number)

    Is there any search exit that can be used on field BANKL to display only some bank based on user defined criteria?
    Regards

    we can create the search help ..
    we dont need to use CMOD or SMOD for this .
    The search help exit are implemented as function module (newly created) . 
    The place for exit in search help is blank but we can assing our exit ( FM created ) into that . Take the F1 help of that in change mode of search help .
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    well  which search help you want to change. and what changes are needed .?

  • Populate and display internal table results using search help exit...

    I have copied F4IF_SHLP_EXIT_EXAMPLE and made changes. I want this search help exit to populate and display contents related to 'FIELD1' when the user enters a specific value for it in the search help screen, meaning when the user restricts the search by that value.  For field2, field3, field4, field5, field6, field7, and field8 I am using a custom view.
    Following is the code:
    TYPES:  BEGIN OF t_search,
                   field2 TYPE field2,
                   field3 TYPE field3,
                   field4 TYPE field4,
                   field5 TYPE field5,
                   field6 TYPE field6,
                   field7 TYPE field7,
                   field8 TYPE field8,
                   field1 TYPE field1,
                END OF t_search.
      DATA: it_itab TYPE TABLE OF t_search,
            wa TYPE t_search,
         wa_selopt TYPE ddshselopt,
            wa_fielddescr TYPE dfies.
    ranges: r_field1 for std_table1-field1
    STEP SELECT    (Select values)
        FREE: r_field1.
    **Get the value entered for FIELD1 in search help
        LOOP AT shlp-selopt INTO wa_selopt.
          CASE wa_selopt-shlpfield.
            WHEN 'FIELD1'.
              r_field1-sign = wa_selopt-sign.
              r_field1-option = wa_selopt-option.
              r_field1-low = wa_selopt-low.
              r_field1-high = wa_selopt-high.
              APPEND r_field1.
              CLEAR: r_field1.
          ENDCASE.
        ENDLOOP.
    **Select 'ID' and 'FIELD1' from table into lt_itab
        SELECT id field1
              INTO TABLE lt_itab
                FROM std_table1
                  WHERE field1 IN r_field1.
        IF sy-subrc = 0.
    **Now, based on the particular IDs from lt_itab, I need to select other values
    from other tables which also have 'ID' as the key.
           SELECT std_table2~field2
                std_table2~field3
                std_table3~field4
                std_table3~field5
                std_table3~field6
                std_table4~field7
                std_table4~field8
                std_table1~field1
              INTO CORRESPONDING FIELDS OF TABLE it_itab
              FROM std_table2
                         INNER JOIN std_table3 ON
                                std_table3mandt = std_table2mandt AND
                                std_table3id = std_table2id
                         INNER JOIN std_table4 ON
                                std_table4mandt = std_table2mandt AND
                                std_table4id = std_table2id
                         INNER JOIN std_table1 ON
                                std_table1mandt = std_table2mandt AND                                           std_table1id = std_table2id
              WHERE
                    std_table1~field1 IN r_field1.
    'id' is common in all the std_tables --> std_table1, std_table2, std_table3, std_table4.
    STEP DISP     (Display values)
    **Then I need to gather all the results in my internal table it_itab and display
    in search help results for the value of FIELD1 entered by the user in the search help.
        CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
          EXPORTING
            parameter   = 'FIELD1'
            fieldname   = 'FIELD1'                          
          TABLES
            shlp_tab    = shlp_tab                                   
            record_tab  = record_tab
            source_tab  = it_itab
          CHANGING
            shlp        = shlp
            callcontrol = callcontrol.
    I am not getting all the data in my internal table and wanted to know if there is anyting wrong in my select statement.
    Any guidance will be appreciated and awarded appropriate points.
    Thanks.

    the webdynpro fieldname and the search help input parameter name were made same.

  • 'Screen Group' in Screen Painter,  & 'Search help Exit'

    Hii All,
    1. What is 'Screen Group' in Screen Painter
    attributes. In which Scenario we will go for it.
      2. What is 'Search help Exit'.
    Please post your messages and guide me in this topic,
    Thanks & Regards,
    John.

    Hi John,
    A Search help exit is something similar to a user exit. Every search help will have an option of attaching a search help exit under the definition tab( when you view the search help from se12).
    For example take a look at the search help VMVA - you will notice a search help exit  SD_F4_SHLP_EXIT_SUBSHLP_CHOOSE attached to it.
    Basically the serah help exit which is nothing but a function module with a predefined interface which gets triggered before a f4 help is displayed. The exit is used to supress or do any other related modification required.
    We have implemented many search help exits and the reason is that we have given a custom interface to our business partners to carry out some transaction on our SAP systems. Though we have given them access to our SAP system we also want to ensure that the business partner does not view any additional data in the system. We have controlled this via many ways like using z objects, using authorizations etc. Still once the user has authorizations to any transaction he or she can do a f4 help on any field and see the data which he should not be able to do. So we have implemented search help exits to supress the drop down only for the business partners. We control this based on the unique login id's we have given to them.
    So in short it is used to modify the behaviour of F4 help, mostly used to supress the drop down.
    It has to be defined in a specific format.
    Hope this helps.
    Cheers
    VJ

  • Problem in Search Help Exit

    Hi Experts,
    I have aproblem in Search help Exit. I have added tab to the standard search help by creating elemntry search help and assigned that search help to standard search help. I am calling function module for search help exit. I dont have any selection method.
    I am getting the epected results by using the funtion module F4UT_RESULTS_MAP. This funtion module displays all the results list. My only problem i have is when i select the value from the results list the value is not populating in to the field.
      CALL FUNCTION 'F4UT_RESULTS_MAP'
        TABLES
          shlp_tab          = shlp_tab
          record_tab        = record_tab
          source_tab        = lt_export
        CHANGING
          shlp              = shlp
          callcontrol       = callcontrol
        EXCEPTIONS
          illegal_structure = 1
          OTHERS            = 2.
      The callcontrol-step =  'RETURN'.
    how can i handle this step to populate the select record in the field.
    Thanks,
    Edited by: FRANCIS REDDY on Jun 11, 2008 5:42 PM

    Hi check my weblog: https://wiki.sdn.sap.com/wiki/x/du0

  • Function Module for search help Exit

    How to create a function Module for search help exits?
    please explain in details with step by step process.

    Hi,
    How to create a function Module for search help exits?
    function module for search help F4IF_SHLP_EXIT_EXAMPLE
    dynamic search help use 'F4IF_INT_TABLE_VALUE_REQUEST'
    please check out the link below it will help you
    A repository object maintained in the ABAP Dictionary. It supplies input fields on Dynpros with single- or multi-column input helps. Search helps can be linked in the Dictionary with components from structures, data elements, and check tables. A search help enables you to search for entry values with assigned data, without you having to know the exact spelling of the value.
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm
    please explain in details with step by step process.
    create a search help exit:
    1. create an fm with this interface:
    *" TABLES
    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
    *" RECORD_TAB STRUCTURE SEAHLPRES
    *" CHANGING
    *" VALUE(SHLP) TYPE SHLP_DESCR_T
    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
    put this logic in it:
    Delete duplicate filter logic.
    This logic only needs to apply at the 'DISP' event - which is just
    before the hit list is displayed
    if callcontrol-step = 'DISP'.
    delete adjacent duplicates from record_tab.
    endif.
    2. edit your search help in se11 and enter the name of the above search help exit fm
    check this sample code..for dynamic search help
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    also check this link it will help you
    /message/3854825#3854825 [original link is broken]
    *********please reward points if the information is helpful to you*************

Maybe you are looking for

  • Export XML data from a CLOB field using sql developer

    I have a table that contains a CLOB field, each record is a complete XML in itself. After running the select query i am exporting this data by right clicking on the answer set, while the export completes the data for each record gets truncated. When

  • Just installed firefox and msn games plugin is gone & i need it back

    im not sure how to go about this. msn started popping up ie9 ads and hooking itself into my system somehow. while trying to stop the interference from ie9, somehow all the fonts in my browser (ie8) were reduced to the point they a pain to read. i fin

  • Sharepoint and SSRS error

    Hi I am getting the below error after deploying SSRS report into sharepoint An error has occurred during report processing. (rsProcessingAborted) Cannot create a connection to data source 'DataSource1'. (rsErrorOpeningConnection) For more information

  • Using Terminal in Mac OSX to program and test java

    I bought a book on java and it says I should not use a JDK like Net Beans when first learning java. Right or wrong I would like to know how to use terminal to program and compile simple scripts. So my question is: How do you go about setting up the c

  • No Centry in CDHDR when Cost Center is created via Idoc

    Hi All, Whenever a cost center is created via an Idoc the corresponding entry is not maintained in CDHDR table. Whereas if I use Tcode ks01 to create Cost Center (ie via screen) then there is an entry to CDHDR table. I tried debugging the FM  IDOC_IN