Combination of 2 fields for an output

I have this 2 fields SBSNBR, SEQNBR and I need to combine them into a 50 character length . The total records  of the two fields will be 11 in total and I want the remaining to populated with zeroes. Blow is an example of expected output: characters
are left justified so it would look like:
12345678900000000000000000000000000000000000000000000000000

LEFT(SBSNBR+SEQNBR+REPLICATE('0',50),50)
Unless they are not string data types, in which case:
LEFT(CAST(SBSNBR AS VARCHAR)+CAST(SEQNBR AS VARCHAR)+REPLICATE('0',50),50)
Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

Similar Messages

  • Combining 2 PowerShell Commands for One Output

    Folks, novice here and I am trying to combine the following commands into one output (if possible)...any guidance? Thanks!
    Get-ADUser -Filter 'teletexterminalidentifier -like "*"'|Select-Object name,teletexterminalidentifier|Export-Csv c:\profile_set1.csv
    Get-ADUser | select SamAccountName,Enabled | Out-File C:\AcctStatus.csv
    In other words, is there a way to pipe these into one command and one set of results (one file)?
    Thanks!

    Get-ADUser -LDAPFilter '(teletexterminalidentifier=*)'|
    Select-Object Name,SamAccountName,TeletexTerminalIdentifier,Enabled |
    Export-Csv c:\profile_set1.csv
    The LDAPFilter is concise and will be a much faster.
    ¯\_(ツ)_/¯

  • Negative sign for DMBTR field in ALV output

    Hi Experts,
    Before posting I have searched for more than 3 hours in the forums to get a solution for this.
    I did not get any solution so I am posting this problem which I need to resolve.
    I have to display the DMBTR field in ALV output for which a grand total will have to be displayed.
    Here for all the values in DMBTR which are negative are getting displayed as '-        6673.56','-       289956.23' as I am using the edit mask 'V_____________.__'.
    I have to get the value shown as '-6673.56', '-289956.23'.
    I tried to use convert this DMBTR to String and have successfully displayed the negative sign correctly in front of the value but I am not getting the totals which I need to have
    PLease check and suggest for a solution.
    Regards
    Kishore

    Hi,
      If this is the case, then you can use character field to display the sign on the left. Sum up the total and use the event end of list to display the same. Remember to set the TECH and NO_OUT in the field catalog.
    Hope this helps.
    Regards,
    Siva

  • Drop down option for an output field in an ALV display

    hi,
    how to provide a drop down option for a field in the output of an ALV Grid display........
    Thanks in advance

    Hi Deepthi,
    Please refer this program BCALV_EDIT_07 and BCALV_EDIT_06.
    This will help you in your program
    <b>Reward Points if Useful</b>
    Thanks
    Vishwanath Purohit

  • How to pass custom search help(F4 help) for a field in ALV output?

    Hi,
    I want to activate the F4 help in ALV output for a field for which we do not have search help assigned at table ,data element and domain level.
    In field catalog i have enabled it by below line.
    ls_fcat-F4AVAILABL = 'X'.
    but because there are no standard input help available it is giving message as "No input help is available".
    so how to pass our custom search help (g_search) for any field in ALV output.
    I am using object oriented ALV grid display.
    Thanks!!!
    Rajesh Gupta.

    hi,
    check this out:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/acdefb13-0701-0010-f1a2-8eeefa7d3780
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true

  • Co41 enhancement for add field in ALV output

    I must add a custom filed to ALV output of transaction CO41 and i trying to use all the 25 enhancements provided (that i find in other post CO41- Enhancement ), but i haven't found any way to get the desired results.
    Can any body help me?
    Thanks in advance.

    Hi,
    I had the same requirement to add a custom field to ALV output of transaction CO41.
    1. I first added the custom field to an new append-structure to the structure SFC_POCO.
    2. Then i added this field to the Dynpro-Screen 200 in the function-group COUP (by choosing the table control, pressing F6 and then adding the custom field of SFC_POCO).
    3. At last i added an Enhancement to the function CO_UP_PLANNED_ORDERS_SELECT and filled my custom field with data there.
    Please reward if useful.
    Regards,
    Henry

  • How to include new fields for output conditions

    Dear Gurus,
    I want to maintain the field "kunag" in output condition table.But it's displaying in allowed filedcatalog but at the time of creating condition table it's not showing there.Please advice me.
    Thanks
    Hari

    HI TRY TO ADD THE FILED TO CONDITION TABLE  and refer below it may helps you
    <b>please click on the link</b>
    <a href="http://www.sap-basis-abap.com/sd/how-to-add-new-fields-to-field-catalog.htm">Adding New field</a>
    Message was edited by:
            SHESAGIRI GEDILA

  • Additional Output fields for ME2N?

    We have created a Z field which exists on the item level of our POs (table EKPO). It is available in the search criteria of our ME2N report, but not in the output. Does anyone know of a way to add additional fields to the output of ME2N? Thanks so much.
    Jim

    Lot of thanks Ken G, I follow your code and solved the same problem.
    1st I add custom field YYJ_4KSCAT in structure MEREP_OUTTAB_PURCHDOC
    then do that enhancement:
    Tcode: ME2N/ME2W/...
    program: LMEREPI02
    Method: if_reader_mm~read_table
    Code:
    ENHANCEMENT 1  ZME2W_CUSTOM_FIELDS.    "active version
       FIELD-SYMBOLS: <ZZ_CUSTOM> TYPE MEREP_OUTTAB_PURCHDOC.
       DATA: idx TYPE sy-tabix.
       IF my_struct_name EQ 'MEREP_OUTTAB_PURCHDOC'.
         LOOP AT <OUTTAB> ASSIGNING <ZZ_CUSTOM>.
           idx = sy-tabix.
           READ TABLE <ekko> into ls_ekko WITH KEY  ebeln = <ZZ_CUSTOM>-ebeln.
           clear lt_ekpo[].
           my_any_ekpo->read_lines( exporting im_key   = ls_ekko-ebeln
                                    importing ex_table = lt_ekpo ).
           READ TABLE lt_ekpo into ls_ekpo WITH KEY  ebeln = <ZZ_CUSTOM>-ebeln
                                                     ebelp = <ZZ_CUSTOM>-ebelp.
             <ZZ_CUSTOM>-YYJ_4KSCAT = ls_ekpo-j_4kscat.
             MODIFY <OUTTAB> FROM <ZZ_CUSTOM> INDEX idx .
         ENDLOOP.
       ENDIF.
    ENDENHANCEMENT.

  • Help required with Access Sequence for 'Delivery output' of Scheduling note

    Dear Gurus
    I need help with creation of an Access Sequence.
    I have created an access sequence for sales org and customer, where the communication is emailed or faxed to the CR party- Forwarding agent.
    BUT - some customers have more than 1 forwarding agent in their masterdata, and not all forwarding agents are wanting to receive fax/email, so if a condition record exists it will always try to send via the method set up against the customer.
    I need to create an access sequence which looks at the customer/ Forwarding agent combination, - I have created new condition tables and Access sequences to include Vendor, - but when i create delivery notes, - this is not working, - it is not recognising the access sequence at all, the vendor party/haulier is not being recognised at all- I keep getting access not made, Initialised field'     
    Please advise how i can get the customer/Forwarding agent scenario to work
    Many thanks
    Tony

    Hi Tony,
    The field SPDNR can not be entered directly in the feild catalog list.
    First it has to be included in the list through inculde or user exit......
    SPRO->Sales and Distribution>System Modifications->Create New Fields (Using Condition Technique)-->New Fields For Output Control---> Use INCLUDE for new fields in Dictionary (messages) or Use user exit for new fields (messages)  
    You ask your ABAP consultant to do this then it will be available in the field catalog list then u can select in the condition table then into access sequence and so on...
    Kindly Reward points if usefull.
    Regards
    vK

  • Add additional field in the output list

    Tcode(VL10G) .ie.out put list will not showing one new field.I want to add one more field to output list. field(VIKP-SDABW) In the SHP_VL10_ITEM and write the logic in the exit LV50R_VIEWG05----
    >USEREXIT_PREPARE_LAYOUT_FILL.Plase explain me step-by-step.It is very uggent?Please help me.
    Thanks & Regards,
    sairam

    Hi Sairam,
    Go through this info.
    /3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.      
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits•        Standard SAP functionality can be enhanced without modification to the standard code.
    •        Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    •        Find the appropriate Enhancement.
    •        Enter the ABAP code in the "Z" program within the function module.
    •        Create a project.
    •        Add the Enhancement to the project.
    •        Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1.    Tools   ABAP Workbench   Utilities   Enhancements   Definition   Utilities   List Enhancements
    2.    Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3.    Execute the search.
    Figure 1. Start Your Search for a Master Exit Here
    4.    Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5.    Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6.    To continue, double-click on the function module EXIT_SAPMF02D_001
    7.    This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement (see Figure 2).
    Figure 2. The Tables That Are Available for the Enhancement
    8.      To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9.      Return to the Source Code tab.
    10.  Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written (see Figure 3).
    Figure 3. Your Program Will Begin After the Include Statement
    11.   Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12.   At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13.  Enter the following ABAP code into the program (Figure 4):
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    Figure 4. The ABAP Code You Need to Enter
    14.   Note that the table name matches the table name in the import tab tables.
    15.   In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16.  Save the program.
    17.  The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools   ABAP Workbench   Utilities   Enhancements   Project Management.
    18.  Enter the project name; begin the name with a "Z."
    19.  Click on the Create button.
    Figure 5. Click on Create After You Type in the Project Name
    20.   Enter in a description for the project.
    21.   Click on the Enhancement Assignments button.
    22.   You will be prompted to save the enhancement. Click on Yes.
    23.   At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24.  Enter the name of the enhancement SAPMF02D (see Figure 6).
    Figure 6. Enter the Name of the Enhancement Here
    25.  Save the project.
    26.  Back out of the enhancement assignment.
    27.  Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    •        Make sure the application is active for Business Transaction Events.
    •        Copy the sample interface function module into a "Z" function module.
    •        Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    •        Activate the function module.
    •        Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1.      IMG Menu Path: Financial Accounting   Financial Accounting Global Settings   Use Business Transaction Events   Environment   Infosystem (Processes).
    2.      Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3.      Execute the search with the defaults.
    4.      Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution (see Figure 7).
    Figure 7. Find the Correct Interface for the Business Event
    5.      Put your cursor on the event and click on the Sample Function Module button.
    6.      You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding (see Figure 8).
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7.      Click on the Copy button.
    8.      Enter the "Z" function module name in the To Function Module field (see Figure 9).
    9.      Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to   Function Groups   Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Figure 9. Enter Your "Z" Function Module Name Here
    10.  In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11.  The system will default into the source code screen where you may enter your ABAP code.
    12.  Notice the tables available for the code. Additional tables may be declared if necessary.
    13.  Enter the following source code (see Figure 10):
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
      select single konzs from lfa1 into z_groupkey
        where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
      t_bsegsub-zuonr = z_groupkey.
      modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    Figure 10. The Screen Where You Enter Your Source Code
    14.  Save the function module.
    15.  Back out to the main Function Builder screen by clicking on the green arrow button.
    16.  Activate the function module by clicking on the Activate button (see Figure 11).
    Figure 11. Activate the Function Module from This Screen
    17.  Assign the function module to the event in the IMG: Financial Accounting   Financial Accounting Global Settings   Business Transaction Events   Settings   Process Function Modules   of an SAP Appl.
    18.  Hit enter past the warning messages that this is SAP data.
    19.  Click on the New Entries button.
    20.  Enter the process for your interface. In your example it is 00001130.
    21.  Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22.  Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23.  Enter the new "Z" function module (see Figure 12).
    Figure 12. Enter Your New "Z" Function Module Here
    24.  Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25.  The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    •      Create a "Z" program for the User Exits and enter the necessary ABAP code.
    •      Enter the new program name into table T80D.
    •      Configure the application to call the User Exit.
    List of User Exits
    •      Variable Field Movements
    •      Substitutions in FI, CO, PCA
    •      Validations in FI, CO, PCA
    •      Rollups in SPL
    •      Fixed Field Movements in SPL
    •      Cost Center Summarization on Detail Screen
    •      Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1.      Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools   ABAP Workbench   Development   ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2.      You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3.      At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change (see Figure 13).
    Figure 13. To Enter Your New Code, Select Source Code and Click on the Change Button
    4.      Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
       where hkont = accit_glx-hkont and
        geber = accit_glx-geber and
        fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5.      Activate the program by clicking on the Activate button.
    6.      Change the configuration in the User Exit table to point to your new "Z" program.
    7.      Follow the IMG menu path: Financial Accounting   Special Purpose Ledger   Basic Settings   User Exits   Maintain Client Specific User Exits.
    8.      The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program (see Figure 15).
    Figure 15. Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9.      Save the changes.
    10.  The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting ? Special Purpose Ledger ? Basic Settings ? Master Data ? Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    Figure 16. After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11.  Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12.  The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13.  Save the field movement.
    14.  You are ready to test your User Exit!
    Rewords some points.
    Rgds,
    P.Naganjana Reddy

  • I am not getting the headings of the fields in ALV output.

    I am not getting ALV out put but  the headings of the fields in ALV output.
    Please see my below code .
    TYPES : BEGIN OF ty_zgxmit.
              INCLUDE STRUCTURE zgxmit.
    TYPES : END OF ty_zgxmit.
    DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
    *&      Form  alv_display                                              *
    This subroutine is to display the out put in ALV.                    *
    FORM alv_display .
    Local data
      DATA: y_x          LIKE boole  VALUE 'X'.
    DATA: lt_fieldcat  TYPE slis_t_fieldcat_alv.
      DATA: lf_fieldcat  TYPE slis_fieldcat_alv.
      DATA: lh_index     LIKE lf_fieldcat-col_pos.
    For variant
    DATA: ws_repid LIKE sy-repid,
          g_save TYPE c VALUE 'A',
          g_exit TYPE c,
          g_variant LIKE disvariant,
          gx_variant LIKE disvariant.
      For 1st field.( RPT_LOC )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'RPT_LOC'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'RPT_LOC'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 2nd field.( BAL_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'BAL_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'BAL_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 3rd field.( INC_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'INC_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'INC_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 4th field.( Z500_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'Z500_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'Z500_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = 'ZJV_2245'
                it_fieldcat              = lt_fieldcat
           TABLES
                t_outtab                 = gt_zgxmit
           EXCEPTIONS
                program_error            = 1
                OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_display

    You can force the headings like so.
    CLEAR lf_fieldcat.
    lf_fieldcat-fieldname = 'RPT_LOC'.
    lf_fieldcat-tabname = 'GT_ZGXMIT'.
    lf_fieldcat-ref_tabname = 'RPT_LOC'.
    lf_fieldcat-ref_fieldname = 'ZGXMIT'.
    lf_fieldcat-reptext_ddic  = 'Whatever Heading'.    "<-  Right here
    lh_index = lh_index + 1.
    lf_fieldcat-col_pos = lh_index.
    lf_fieldcat-key = y_x.
    lf_fieldcat-no_sum = y_x.
    APPEND lf_fieldcat TO lt_fieldcat.
    Regards,
    Rich Heilman

  • Not all fields for Business partner are exported

    Hello,
    I am exporting Business partner data from CRM to another system, through XIF. I get on target system XML file with Business partner data. But I have only standart fields. I can't get fields, which was created my company for own use.
    For example, for Business partner I have Business Agreement, but after export to XML, I have no Business agreement data in another system. But I have standart data, for example, Business partner Name, ID, ets.
    Anybody know what I can do to export all the fields for Business partner? Some transaction or somthing else? Where can I customize output XML with Business partner data?
    Best regarda,
    Alexander.

    Hi,
    You have the right observation. There is no mandatory fields for BP. It means you can update any single field against CardCode. CardCode is the only mandatory field which is the only primary key must be unique.
    Thanks,
    Gordon

  • Not allowing totaling of a field in alv output

    hi,
    I had made a ALV in which i have to hide 1 field for getting it totaling.
    i.e. if somebody try to make total of it ,it should not be allowed on dat field . is dere any solution for this problem?
    plzz provide me guidelines for it.

    Please please it this. I made the total for every field other than RACCT and SUM_COMM.
    *&      Form  sub_prepare_display_output
          Display output
    -->  No Parameter
    FORM sub_prepare_display_output .
    Local variables
      DATA: l_lead_col   TYPE char25,       " Lead column
            l_progname   TYPE sy-repid,     " Program name
    Local internal tables
            l_oref_layout TYPE REF TO cl_salv_layout, "Layout
    Local work area
            l_wa_key      TYPE salv_s_layout_key,     "Work area for key
            l_except1   TYPE REF TO cx_salv_msg,"Exception
            l_text1     TYPE string.            "Exception msg
    If profit center is checked
      IF p_prfctr = c_check.
        l_lead_col = 'Profit Center'(041).
    If product catagory is checked
      ELSEIF p_prodc = c_check.
        l_lead_col = 'Product Category'(042).
    If material is checked
      ELSEIF p_smatnr = c_check.
        l_lead_col = 'Material No.'(043).
      ENDIF.
    Create ALV instance with class-method cl_salv_table=>factory
      TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              list_display = if_salv_c_bool_sap=>false
            IMPORTING
              r_salv_table = v_oref_table
            CHANGING
              t_table      = i_final.
        CATCH cx_salv_msg INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    Make header of the report
      PERFORM sub_header_report USING v_oref_table.
    Get the toolbar
      v_oref_functions = v_oref_table->get_functions( ).
    For activating application toolbar
      v_oref_functions->set_all( abap_true ).
      v_oref_columns = v_oref_table->get_columns( ).
    It populate the key fields which are always displayed
      PERFORM sub_fill_fields_of_fcatalog USING:
    'SUM_COMM'        l_lead_col                ' ',
    'RACCT'          'Account Number'(035)      ' ',
    'FOBAC'          'FOB Acrual'(023)          'X',
    'EXCESS'         'Excess'(024)              'X',
    'OBSOLE'         'Obsolescence'(025)        'X',
    'PPV'            'Puchachse Price Var'(026) 'X',
    'FR_VAR'         'Freight Variance'(027)    'X',
    'PROD_OR_VAR'    'Produc Ord Var'(028)      'X',
    'DEP_VAR'        'Dept. Variance'(029)      'X',
    'OTH_PROD_VAR'   'Other Prod Var'(030)      'X',
    'PR_OR_SCRP_VAR' 'Scrap Variance'(031)      'X',
    'COST_OF_ACC'    'Cost of Sales Accnt'(032) 'X',
    'INV_ACC'        'Inventory Account'(033)   'X'.
    Optimize the columns
      v_oref_columns->set_optimize( value = 'X' ).
    Setting the layout
    get the LAYOUT object
      l_oref_layout = v_oref_table->get_layout( ).
    set the layout key
      l_progname = sy-repid.
      l_wa_key-report = l_progname.
      l_oref_layout->set_key( value = l_wa_key ).
    set save restriction:
    none / only user-dependent / only user-independent
      l_oref_layout->set_save_restriction(
      value = if_salv_c_layout=>restrict_none  ).
    set: setting of default layout is allowed / isnu2019t allowed
      l_oref_layout->set_default( value = 'X' ).
    Dispaly the output
      v_oref_table->display( ).
    ENDFORM.                    " sub_prepare_display_output
    *&      Form  sub_header_report
        Create the header of the report
         -->P_v_oref_TABLE  table name
    FORM sub_header_report  USING    p_v_oref_table TYPE REF TO
                                               cl_salv_table .
      DATA : l_oref_grid TYPE REF TO cl_salv_form_layout_grid.
      CREATE OBJECT l_oref_grid.
    Add  text items for top of page
      l_oref_grid->create_text( row = 1  column = 1  text = 'Program'(022)
      l_oref_grid->create_text( row = 1  column = 2  text = sy-repid  ).
      l_oref_grid->create_text( row = 2  column = 1
      text = 'User Name'(021) ).
      l_oref_grid->create_text( row = 2  column = 2  text = sy-uname  ).
      l_oref_grid->create_text( row = 3  column = 1  text = 'Date'(020) ).
      l_oref_grid->create_text( row = 3  column = 2  text = sy-datum ).
      l_oref_grid->create_text( row = 3  column = 3  text = 'Time'(019)  ).
      l_oref_grid->create_text( row = 3  column = 4  text = sy-uzeit  ).
      l_oref_grid->create_text( row = 4  column = 1  text = 'System'(018) ).
      l_oref_grid->create_text( row = 4  column = 2  text = sy-sysid ).
      l_oref_grid->create_text( row = 4  column = 3  text = 'Client'(017) ).
      l_oref_grid->create_text( row = 4  column = 4  text = sy-mandt ).
    Declare grid as header of list
      p_v_oref_table->set_top_of_list( value = l_oref_grid ).
    ENDFORM.                    " sub_header_report
    *&      Form  sub_fill_fields_of_fcatalog
          This subroutine populates the field catalog excluding
          period fields
         -->P_FIELDNAME Table field name
         -->P_NAME      Field description
         -->P_DEC       Decimal value flag
    FORM sub_fill_fields_of_fcatalog  USING p_fieldname TYPE lvc_fname
                                            p_name      TYPE c
                                            p_dec       TYPE c.
      DATA: l_char_l TYPE scrtext_l,  "For short text
            l_char_m TYPE scrtext_m,  "For medium text
            l_char_s TYPE scrtext_s,  "For long text
            l_except1   TYPE REF TO cx_salv_not_found,"Exception
            l_text1     TYPE string,            "Exception msg
            l_orf_aggregs TYPE REF TO cl_salv_aggregations.
    Getting the text long/short/medium into variables
      l_char_l = p_name.
      l_char_m = p_name.
      l_char_s = p_name.
    Setting the long/short/medium text and fix the key fileds
      TRY.
          CALL METHOD v_oref_columns->get_column
            EXPORTING
              columnname = p_fieldname
            RECEIVING
              value      = v_oref_column1.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
      v_oref_column ?= v_oref_column1.
      v_oref_column->set_long_text( l_char_l ).
      v_oref_column->set_medium_text( l_char_m ).
      v_oref_column->set_short_text( l_char_s ).
      v_oref_column->set_key( value = 'X' ).
      v_oref_columns->set_key_fixation( value = 'X' ).
    Set the decimal length
      IF p_dec = 'X'.
        v_oref_column->set_decimals( value = '2' ).
      ENDIF.
      IF p_fieldname = 'RACCT' AND p_gl <> c_check.
        v_oref_column->set_visible( value = space ).
      ENDIF.
      IF p_gl = c_check.
        v_oref_columns->set_column_position( columnname = 'RACCT'
                                               position = 2 ).
      ENDIF.
      IF p_fieldname NE 'RACCT' AND p_fieldname NE 'SUM_COMM'.
        l_orf_aggregs = v_oref_table->get_aggregations( ).
        l_orf_aggregs->add_aggregation( columnname = p_fieldname
                       aggregation = if_salv_c_aggregation=>total ).
      ENDIF.
    ENDFORM.                    " sub_fill_fields_of_fcatalog

  • Field Bus. Area is a required field for G/L account - during VF02

    Dear All,
    Having error "Field Bus. Area is a required field for G/L account.." during billing VF02 in SD. Config done:
    1) FI requires BA... So not allowed to change FSG....
    2) BA assignment to plant/ division in SD done...  Rule 1
    3) Material master updated with division..done...
    Please give the solution.
    Regards,
    Ranjeet

    Dear,
    Business Area is assigned to Plant and Division Combination in:
    SPRO>Enterprise Structure>Assignment-->Sales & Distribution >Business Area Account Assignment>Assign Business Are to Plant and Division.
    Please check whether BA is assigned or not.
    Br,Vivek
    Edited by: View_taurian on Sep 15, 2011 4:11 PM

  • Obtain list of fields for marketing attributes against BP

    Hi All,
    I'm working on a data extraction routine for BP data and need to be able to allow the user to select which fields will be extracted and added to the output file.  I've got some standard code that so far uses a data dictionary structure to create a pop up of fields with checkboxes so the user can select which fields to output - it uses FM DDIF_FIELDINFO_GET to simply list all fields for a given structure.
    My requirement is to extend this so that all possible marketing attributes against business partners are also available for selection in the field list.  I guess to do this I need to find a way of reading all fields defined for any BP type attribute sets.
    Does anyone know of any FM's that do this or have any ideas around tables I can read?
    Note: I'm after the atttribute names not the actual values.
    Thanks,
    Gareth.

    Hi Gareth
    I think the function modules in group CRM_MKTPFTPL_OW are really valuable.
    Maybe you could call CRM_MKTPFTPL_GETLIST and then call CRM_MKTPFTPL_READ_CHR for each one.
    They aren't called by Pratik's FM's though .
    Cheers
    Dom

Maybe you are looking for