OTL: Timecard Audit Template require reason code for all transaction.

We are currently using OTL with CLA template with interface time entry from external system.
When monthly time entry interfaced into OTL each employee have to review and update their time and submit to manager, but when process to audit template they has been forced to update reason code for all transactions.
We suppose to update the reason code only for the modified transactions. Please help me.
Nonny.

nondhasid,
If you are not modifying those records which are asking for a reason field to be filled, then it should be coming from the Late setup. Check the CLA setup.
--Shiv                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Blocking a company code for all transactions.

    A compnay code is having two plants assigned. No open documents in that company code.
    How to block the company code for any transactions including purchase document creation?
    However all the past data to be available for viewing and reference.
    Thanks in advance.
    Narasimharao

    Dear Narasimharao ,
    You can remove authorization from user profile to use this company code.
    And when someone try to save any documents , error message will be send.
    hope this could help you.
    best regards,
    Carlos Moçatto

  • Reason Code for MI07

    Hi MM Guru,
    I have created a inventory count document no: 100025069, When i try to post the difference in MI07 i need to have a reason code for the transaction. This is scrapping and movement type is 702. When i search for the code it does not apear any 702 codes i can use. Please have a look what can be done.
    Thanks in advance,
    Iram

    Hi,
    Go to OLMB and here crete the general reason code for material sdjustments  , means the Poor quality , Breakabel or some other reasaons.
    If u donts want that fiels as mandatory  , make that one as optional field in screen layout og MIGO.
    Regards,
    Andra

  • Reason code for short payment received from Customers

    Hello
    We are on ECC 6.0 without application of any enhancement package.
    Requirement is to capture reasons of short payment received from customer and generate a report based on such reason codes.
    Reasons of short payment received could be - Adhoc payment; Excess billed; Tax deducted at source (TDS) on freight / service charges and Bank charges etc.
    Let me know relevant configuration required.
    Would reason codes be captured during incoming payment entry or customer account clearing?
    Thanks.
    Vimal, India

    Hi Vimal
    Following is the configuration for Reason code for customer payments. It can be short payment, over payment or discount not allowed.
    First step is to define reason code. You do this in Financial Accounting (New >Accounts Receivable and Accounts Payable>Incoming Payments>Incoming Payments Global Settings>Overpayment/Underpayment>Define Reason Codes
    Define reason code , short text, long text and assign it to correspondence type. (please note correspondence type settings needs to be done first).  There is a column c which is Indicator: Charge off difference via separate account set this if you want to post the difference to seperate account during clearing customer open item.
    The second step is to define accounts for payment difference.
    Financial Accounting (New >Accounts Receivable and Accounts Payable>Incoming Payments>Incoming Payments Global Settings>Overpayment/Underpayment>Define Accounts for Payment Differences
    Assign G/L accounts against reason codes.
    The third step is Define Reason Code Conversion Version
    Financial Accounting (New >Accounts Receivable and Accounts Payable>Incoming Payments>Incoming Payments Global Settings>Overpayment/Underpayment>Define Reason Code Conversion Version
    In this step, you make the default settings you need for the manual incoming payment processing via payment advice notes. If differences between the payment advice item and the total of the allocated open items occur after selecting the open items, you can enter a reason code in the payment advice item. This represents the reason for the reduction of the payment amount specified by the paying person.
    Create version 001 and name for it.
    For correspondence type create or assign relevant form and print program in global settings> correspondence
    Once you have these settings you can insert appropriate reason code while clearing customer open item .
    You can print correspondence via T-ode F.62 on a monthly basis or wekly basis.
    Hope this helps.
    Thanks
    Sanjeev

  • Capturing change code/Reason code in CAT2 transaction for time change

    Experts,
    Wanted your suggestion and expertise in a solution where in CAT2 if a user changes the time/wbs element/tax area/work type he should be forced to put the reason code for change. The change event would populate/capture the change code, reason for change at cell level in CAT2
    Your pointers would be of great help

    The following enhancements are required to achieve the new pop up window functionality:
    1.     A new customer field should be added to the CATS time entry screen in the CATSDB.
    2.     A new check table should be created in CATSDB containing the allowable drop down entries for the new field.
    Customer fields are inserted into the CI_CATSDB structure. This structure is contained in the database table for the Time Sheet (CATSDB).
    Steps:
    1. Create a customer project using the SAP enhancement CATS0005.
    2. On the initial project administration screen, select the Enhancement components field and choose Change.
    3. Select the entry CI_CATSDB and choose Edit -> Components.
    4. Create the structure CI_CATSDB.
    5. Insert the new field to the Time Sheet database table into the structure.
        Select the data dictionary type CHAR
    6. Check and save the structure.
    7. Activate the structure.
    8. In the Cross Application > Time sheet section of the IMG Choose Make field assignment.
    9. Assign the new field to the view.
    10. Assign a number from 1 - 10 specify the name of the field, u201CChange Reasonu201D.
    Then Conditions Check for New Field:According to requirement

  • Where to configure the reason code for payment differene

    Dear Experts,
    I did the settings in obxl with reason code option and changed the screen layout for the postings keys for payment difference as mandatory. while doing the account assignment in obxl system asking the reason code for payment difference. Where to configure the reason code any t.code is there, please guide me.
    J.francis

    Just Go SPRO>IMG>Financial Accounting (New) >Accounts Receivable and Accounts Payable > Business Transactions > Outgoing Payments > Manual Outgoing Payments > Overpayment/Underpayment > Define Reason Codes (Manual Outgoing Payments)
    There you have to create Reason Code
    Now go  SPRO>IMG>Financial Accounting (New) >Accounts Receivable and Accounts Payable > Business Transactions > Outgoing Payments > Manual Outgoing Payments > Overpayment/Underpayment >Define Accounts for Payment Differences (Manual Outgoing Payment)
    Here assign GL
    Best Of Luck
    Tanmoy

  • URGENTLY REQUIRE A CODE FOR FOLLOWING--WOULD BE GREAT HELP

    HOW TO VALIDATE XML FILE USING SAX PARSER WITH SCHEMAS like .XSD FILES

    Mankjas wrote:
    URGENTLY REQUIRE A CODE FOR FOLLOWING--WOULD BE GREAT HELPNo, it wouldn't be a great help, as the next time you needed to do something like this you'd still be lost.
    And no one here is just simply going to give you code anyway. We'll help you correct yours, and give you advice and tips, but we are not going to do your work for you. And urgent it is not, not to us. And your insisting that it is, is rude. We definately are not going to drop everything we might be doing to "help" you, especially when your essentially demanding that we do your work for you, with no effort on your part, besides.

  • Display address omitted postal code for all countries in sapscript

    Hi everyone
    Does anyone know how to omit the postal code for all countries(eg. US ) when displaying address in sapscript form?
    I want to avoid to display postal code even the country is US.
    coz my firm doesn't want to show postal code.....
    Also, how to use combination keys of PRIORITY parameter?
    For example, if i want PRIORITY '1' 'S' 'L' 'N' 'C'
    I cannot write like this as following....
    /:   ADDRESS DELIVERY PARAGRAPH AS <b>PRIORITY 1 S L N C</b> LINES 5
    /:   ADDRESSNUMBER &VBDKR-ADRNR_WE(K)&
    /:   FROMCOUNTRY &VBDKR-SLAND&
    /:   ENDADDRESS

    Hi,
    Bold text describes the usage of <b>Priority</b>.
    ADDRESS: Formatting of addresses
    The command ADDRESS - ENDADDRESS formats an address according to the postal standards of the
    destination country defined in the parameter COUNTRY. The reference fields are described in the
    structure ADRS. Both constants and symbols can be assigned to the parameters.
    Syntax:
    /: ADDRESS [DELIVERY] [PARAGRAPH a] [PRIORITY p] [LINES l]
    /: TITLE title
    /: NAME name1[,name2[,name3[,name4]]]
    /: STREET street
    /: POBOX PO box [CODE zip code]
    /: POSTCODE zip code
    /: CITY town1[,town2]
    /: REGION region
    /: COUNTRY country
    /: FROMCOUNTRY from country
    /: ENDADDRESS
    Both formatting data and address data are given as parameters. Address data is formatted for output in accordance with the parameters COUNTRY, PRIORITY and LINES. If available, the P.O. box is used instead of the street as the default.
    •&#61472;DELIVERY: Defines the street address. If this parameter is selected, the system prints the street address on the layout output instead of the P.O. box.
    •&#61472;PARAGRAPH: Defines in which paragraph format the address is output. If the parameter is not defined, the address is output in the default paragraph format.
    <b>•&#61472;PRIORITY: Defines which address lines can be omitted if necessary. You can enter a combination of the following values:
    A form of address
    P mandatory blank line 1
    Q mandatory blank line 2
    2 name2
    3 name3
    4 name4
    L name of country
    S line for the street
    O line for the city
    </b>
    •&#61472;LINES: Defines how many lines are available for formatting the address. If all the address data cannot be formatted due to an insufficient number of lines, the data entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command is in a layout set window whose type is not MAIN, the lines available for the address layout are then calculated automatically by means of the current output line item and window size.
    •&#61472;TITLE: Required form of address.
    •&#61472;NAME: Up to four separate names, separated by commas, can be defined.
    •&#61472;STREET: Street specification including address number.
    •&#61472;POBOX: Post Office box number.
    •&#61472;CODE: P.O. box Postal or ZIP code if it is different from the postal code of the city.
    •&#61472;POSTCODE: Postal or ZIP code of the city.
    •&#61472;CITY: Up to two place names can be defined.
    •&#61472;REGION: Determines the administrative area.
    •&#61472;COUNTRY: Specifies the country according to whose specific postal standards the address    is formatted.
    •&#61472;FROMCOUNTRY: Defines in which language the name of the destination country is formatted. In EC countries, only the international country identification letter is put before the postal code with a hyphen.
    Example:
    /: ADDRESS
    /: TITLE ‘Company’
    /: NAME ‘Widget Technology, Inc.’, ‘All Kind of Widgets’
    /: STREET ‘1005 Lido Lane’
    /: POBOX ‘2935’ CODE ‘94400’
    /: POSTCODE ‘94404’
    /: CITY ‘Foster City’
    /: REGION ‘CA’
    /: COUNTRY ‘USA’
    /: FROMCOUNTRY ‘USA’
    /: ENDADDRESS
    Generates the following address:
    Company
    Widget Technology, Inc.
    All Kind of Widgets
    PO box 2935
    Foster City, CA 94400
    If the supplement DELIVERY is specified for the command ADDRESS, then the street is entered instead of
    the PO box.
    Company
    Widget Technology, Inc.
    All Kind of Widgets
    1005 Lido Lane
    Foster City, CA 94404
    Regards,
    Sailaja.
    Reward points if answer helps you.

  • BDC code for MM01 Transaction

    Hi All,,
                 Please give Entire BDC code for MM01 Transaction.
    i will change as per my requirement.
    I think this is already done by some ABAP Consultants.
    plz dont give answers like do recording for that transaction MM01. I know recording...
    For time constraiint, I have to complete soon.....
    Thanks in Advance
    BestRegards,
    Anil

    Hi,
    The below code is using the Session Method
    report ZDS_BDC_MM01
           no standard page heading line-size 255.
    include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: XFELD
            KZSEL_02_005(001),
    * data element: MAKTX
            MAKTX_006(040),
    * data element: MEINS
            MEINS_007(003),
    * data element: MAKTX
            MAKTX_008(040),
          end of record.
    *** End generated data section ***
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      ='C:\DHRUV.TXT'
       FILETYPE                      = 'DAT'
    *   HAS_FIELD_SEPARATOR           = ' '
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = RECORD
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *do.
    LOOP AT record.
    *read dataset dataset into record.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'
                                  record-KZSEL_02_005.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_006.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_007.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_008.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    *enddo.
    ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *Text elements
    * E00 Error opening dataset, return code:
    * I01 Session name
    * I02 Open session
    * I03 Insert transaction
    * I04 Close Session
    * I05 Return code =
    * I06 Error session created
    * S01 Session name
    * S02 User
    * S03 Keep session
    * S04 Lock date
    * S05 Processing Mode
    * S06 Update Mode
    * S07 Generate session
    * S08 Call transaction
    * S09 Error sessn
    * S10 Nodata indicator
    * S11 Short log
    *Messages
    * Message class: MS
    *613   Please enter a session name and user name
    The Below is the coding for the Call Transaction...
    report ZDS_BDC_MM01_2
           no standard page heading line-size 255.
    *include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: MAKTX
            MAKTX_005(040),
    * data element: MEINS
            MEINS_006(003),
    * data element: MTPOS_MARA
            MTPOS_MARA_007(004),
          end of record.
    DATA: FLNAME TYPE STRING.
    *** End generated data section ***
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    *** MESSAGE******
    DATA: BEGIN OF MESSTAB OCCURS 0.
            INCLUDE STRUCTURE BDCMSGCOLL.
            DATA: MATNR TYPE MARA-MATNR,
          END OF MESSTAB.
    ****END OF MESSAGE****
    PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
      CALL FUNCTION 'F4_FILENAME'
       IMPORTING
         FILE_NAME           = FILENAME.
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    FLNAME = FILENAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FLNAME
        FILETYPE                      = 'DAT'
    *   HAS_FIELD_SEPARATOR           = ' '
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = record
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT record.
      DATA:
        CNT TYPE I.
        CNT = CNT + 1.
        REFRESH BDCDATA.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_007.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    *perform bdc_transaction using 'MM01'.
    CALL TRANSACTION 'MM01' USING BDCDATA
                            MODE 'N'
                            UPDATE 'A'
                            MESSAGES INTO MESSTAB.
    READ TABLE MESSTAB INTO MESSTAB INDEX CNT.
       IF MESSTAB-MSGTYP = 'E'.
         MESSTAB-MATNR = RECORD-MATNR_001.
         MODIFY MESSTAB INDEX CNT FROM MESSTAB. " TRANSPORTING MATNR.
       ENDIF.
    ENDLOOP.
    FORM OPEN_GROUP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = 'MM01'
                        USER     = SY-UNAME
                        KEEP     = 'X'.
    ENDFORM.
    FORM BDC_INSERT.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'MM01'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = BDCDATA
       EXCEPTIONS
         INTERNAL_ERROR         = 1
         NOT_OPEN               = 2
         QUEUE_ERROR            = 3
         TCODE_INVALID          = 4
         PRINTING_INVALID       = 5
         POSTING_INVALID        = 6
         OTHERS                 = 7
      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.
    END-OF-SELECTION.
    LOOP AT MESSTAB.
        IF MESSTAB-MSGTYP = 'E'.
          WRITE:/ 'ERROR OCCURED ON MATNR = ',MESSTAB-MATNR , 'MESSAGE : MATNR ALREADY EXISTS IN MARA!!!'.
        ENDIF.
      ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *&      Form  close_group
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM close_group .
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
       NOT_OPEN          = 1
       QUEUE_ERROR       = 2
       OTHERS            = 3
    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.                    " close_group
    *&      Form  bdc_dynpro
    *       text
    *      -->P_0270   text
    *      -->P_0271   text
    FORM bdc_dynpro  USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
    *       text
    *      -->P_0275   text
    *      -->P_0276   text
    FORM bdc_field  USING  FNAM FVAL.
      IF FVAL <> ' '.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    " bdc_field
    *Text elements
    * E00 Error opening dataset, return code:
    * I01 Session name
    * I02 Open session
    * I03 Insert transaction
    * I04 Close Session
    * I05 Return code =
    * I06 Error session created
    * S01 Session name
    * S02 User
    * S03 Keep session
    * S04 Lock date
    * S05 Processing Mode
    * S06 Update Mode
    * S07 Generate session
    * S08 Call transaction
    * S09 Error sessn
    * S10 Nodata indicator
    * S11 Short log
    HTH
    Regards,
    Dhruv Shah

  • Hi guys please give me sample code for call transaction that handles error

    hi guys, please give me sample code for call transaction that handles error,
    please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code.
    please do help me as it is urgent.
    thanks and regards.
    prasadnn.

    Hi Prasad,
    Check this code.
    Source Code for BDC using Call Transaction
    *Code used to create BDC
    *& Report  ZBDC_EXAMPLE                                                *
    *& Example BDC program, which updates net price of item 00010 of a     *
    *& particular Purchase order(EBELN).                                   *
    REPORT  ZBDC_EXAMPLE  NO STANDARD PAGE HEADING
                          LINE-SIZE 132.
    Data declaration
    TABLES: ekko, ekpo.
    TYPES: BEGIN OF t_ekko,
        ebeln TYPE ekko-ebeln,
        waers TYPE ekko-waers,
        netpr TYPE ekpo-netpr,
        err_msg(73) TYPE c,
    END OF t_ekko.
    DATA: it_ekko  TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko  TYPE t_ekko,
          it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_error TYPE t_ekko,
          it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_success TYPE t_ekko.
    DATA: w_textout            LIKE t100-text.
    DATA: gd_update TYPE i,
          gd_lines TYPE i.
    *Used to store BDC data
    DATA: BEGIN OF bdc_tab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    *Used to stores error information from CALL TRANSACTION Function Module
    DATA: BEGIN OF messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    *Screen declaration
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                        TITLE text-001. "Purchase order Num
    SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
                                        TITLE text-002. "New NETPR value
    PARAMETERS:  p_newpr(14)   TYPE c obligatory.  "LIKE ekpo-netpr.
    SELECTION-SCREEN END OF BLOCK block2.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Retrieve data from Purchase order table(EKKO)
      SELECT ekkoebeln ekkowaers ekpo~netpr
        INTO TABLE it_ekko
        FROM ekko AS ekko INNER JOIN ekpo AS ekpo
          ON ekpoebeln EQ ekkoebeln
       WHERE ekko~ebeln IN so_ebeln AND
             ekpo~ebelp EQ '10'.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Check data has been retrieved ready for processing
      DESCRIBE TABLE it_ekko LINES gd_lines.
      IF gd_lines LE 0.
      Display message if no data has been retrieved
        MESSAGE i003(zp) WITH 'No Records Found'(001).
        LEAVE TO SCREEN 0.
      ELSE.
      Update Customer master data (instalment text)
        LOOP AT it_ekko INTO wa_ekko.
          PERFORM bdc_update.
        ENDLOOP.
      Display message confirming number of records updated
        IF gd_update GT 1.
          MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
        ELSE.
          MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
        ENDIF.
    Display Success Report
      Check Success table
        DESCRIBE TABLE it_success LINES gd_lines.
        IF gd_lines GT 0.
        Display result report column headings
          PERFORM display_column_headings.
        Display result report
          PERFORM display_report.
        ENDIF.
    Display Error Report
      Check errors table
        DESCRIBE TABLE it_error LINES gd_lines.
      If errors exist then display errors report
        IF gd_lines GT 0.
        Display errors report
          PERFORM display_error_headings.
          PERFORM display_error_report.
        ENDIF.
      ENDIF.
    *&      Form  DISPLAY_COLUMN_HEADINGS
          Display column headings
    FORM display_column_headings.
      WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
      SKIP.
      WRITE:2 'The following records updated successfully:'(013).
      WRITE:/ sy-uline(42).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(004), sy-vline,
              (11) 'Old Netpr'(005), sy-vline,
              (11) 'New Netpr'(006), sy-vline.
      WRITE:/ sy-uline(42).
    ENDFORM.                    " DISPLAY_COLUMN_HEADINGS
    *&      Form  BDC_UPDATE
          Populate BDC table and call transaction ME22
    FORM bdc_update.
      PERFORM dynpro USING:
          'X'   'SAPMM06E'        '0105',
          ' '   'BDC_CURSOR'      'RM06E-BSTNR',
          ' '   'RM06E-BSTNR'     wa_ekko-ebeln,
          ' '   'BDC_OKCODE'      '/00',                      "OK code
          'X'   'SAPMM06E'        '0120',
          ' '   'BDC_CURSOR'      'EKPO-NETPR(01)',
          ' '   'EKPO-NETPR(01)'  p_newpr,
          ' '   'BDC_OKCODE'      '=BU'.                      "OK code
    Call transaction to update customer instalment text
      CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
             MESSAGES INTO messtab.
    Check if update was succesful
      IF sy-subrc EQ 0.
        ADD 1 TO gd_update.
        APPEND wa_ekko TO it_success.
      ELSE.
      Retrieve error messages displayed during BDC update
        LOOP AT messtab WHERE msgtyp = 'E'.
        Builds actual message based on info returned from Call transaction
          CALL FUNCTION 'MESSAGE_TEXT_BUILD'
               EXPORTING
                    msgid               = messtab-msgid
                    msgnr               = messtab-msgnr
                    msgv1               = messtab-msgv1
                    msgv2               = messtab-msgv2
                    msgv3               = messtab-msgv3
                    msgv4               = messtab-msgv4
               IMPORTING
                    message_text_output = w_textout.
        ENDLOOP.
      Build error table ready for output
        wa_error = wa_ekko.
        wa_error-err_msg = w_textout.
        APPEND wa_error TO it_error.
        CLEAR: wa_error.
      ENDIF.
    Clear bdc date table
      CLEAR: bdc_tab.
      REFRESH: bdc_tab.
    ENDFORM.                    " BDC_UPDATE
          FORM DYNPRO                                                   *
          stores values to bdc table                                    *
    -->  DYNBEGIN                                                      *
    -->  NAME                                                          *
    -->  VALUE                                                         *
    FORM dynpro USING    dynbegin name value.
      IF dynbegin = 'X'.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-program,
               value TO bdc_tab-dynpro,
               'X'  TO bdc_tab-dynbegin.
        APPEND bdc_tab.
      ELSE.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-fnam,
               value TO bdc_tab-fval.
        APPEND bdc_tab.
      ENDIF.
    ENDFORM.                               " DYNPRO
    *&      Form  DISPLAY_REPORT
          Display Report
    FORM display_report.
      FORMAT COLOR COL_NORMAL.
    Loop at data table
      LOOP AT it_success INTO wa_success.
        WRITE:/      sy-vline,
                (10) wa_success-ebeln, sy-vline,
                (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
                (11) p_newpr, sy-vline.
        CLEAR: wa_success.
      ENDLOOP.
      WRITE:/ sy-uline(42).
      REFRESH: it_success.
      FORMAT COLOR COL_BACKGROUND.
    ENDFORM.                    " DISPLAY_REPORT
    *&      Form  DISPLAY_ERROR_REPORT
          Display error report data
    FORM display_error_report.
      LOOP AT it_error INTO wa_error.
        WRITE:/      sy-vline,
                (10) wa_error-ebeln, sy-vline,
                (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
                (73) wa_error-err_msg, sy-vline.
      ENDLOOP.
      WRITE:/ sy-uline(104).
      REFRESH: it_error.
    ENDFORM.                    " DISPLAY_ERROR_REPORT
    *&      Form  DISPLAY_ERROR_HEADINGS
          Display error report headings
    FORM display_error_headings.
      SKIP.
      WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
      SKIP.
      WRITE:2 'The following records failed during update:'(008).
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(009), sy-vline,
              (11) 'Netpr'(010), sy-vline,
              (73) 'Error Message'(012), sy-vline.
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_NORMAL.
    ENDFORM.                    " DISPLAY_ERROR_HEADINGS
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Is there any T-codes for all these............

    Hello all
    I came to know that there are T-codes for all these like
    Infoprovider,Infosource,PSA and etc.........
    pl let me know
    regards
    balaji

    Hi Balaji,
    the tcodes are
    rsa11   InfoProvider
    rsa12   InfoSources
    rsa15   PSA
    Have a look in Tabele TSTCT, select your language an filter for transaction RS* to get a list of most BW-related Transactions
    regards
    Robert

  • Awesome Site with Example Code For All Classes

    Very cool site that has example code for all the Java classes and APIs. You can submit example code yourself too!
    http://www.kickjava.com/

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

  • Need BDC code for Call Transaction of VL31N, which creates Inbound del.s,

    Hi Experts,
    Is any body does have the BDC (CALL TRANSACTION) code for VL31N transaction, where we can crete INBOUND deliveries from Purc Orders.
    Actually, currently am doing by using FM - GN_DELIVERY_CREATE, but, its not given me a chance to incorporate BATCH SPLIT functionality. So, decided to go with BDC
    1 - Is this VL31N is Okay for BDC, bcoz, some where I red that, since its a ENJOY tx, its NOT recommended?
    2 - Is there any other FM, BAPI to create INBOUND deliveries from POs, which can take care of BATCH SPLIT functionality?
    3 - BDC code for VL31N  tx.
    thanq
    Edited by: Srinivas on Jul 29, 2008 1:47 PM

    1 - Is this VL31N is Okay for BDC, bcoz, some where I red that, since its a ENJOY tx, its NOT recommended?
    yes you can do that .
    2 - Is there any other FM, BAPI to create INBOUND deliveries from POs, which can take care of BATCH SPLIT functionality?
    using BDC we can achieve the  Barch split functionality.
    3 - BDC code for VL31N tx.
    Record using SHDB it will give you.

  • Numbering series for all TRANSACTIONS

    hello gurus,
    Normally, in SBO system continues with the same numbering series for all Transactions.
    my question is : is there a option to create new numbering series for the TRANSACTIONS.
    thank you .

    Hello,
    It is not normal for B1 that uses the same numbering series for all Transactions.  Only if you have selected this option, you would get this results.  However, this option may not be changeable if you have posted transaction already.
    Thanks,
    Gordon

  • Reason Code for Reversal

    Dear Experts,
    When I am doing reversal of any document using FB08, I am giving reason code as Cheque Bounce or some other reason code. But when I am viewing the same document, the reason code is not available.
    I have checked the same in BKPF but the same is not available there also. Please advise why the reason code is not posted in table.
    Thanks,
    Deb

    I have tried with all fields you have mentioned, but unable to find the entry for the reason. I think there could be some problem in "Reasons for Reversal" settings in SPRO. There have 2 combination of selections, 1 for negative entries and another is for Alternative Posting dates. I have also tried with all the combinations, but still it is not working. Please advise if there is some other combination or assignments for these codes to somewhere to get the desired results.
    Thanks,
    Deb

Maybe you are looking for