Bdc for material schedule update for me38. i try below code but its log shows it is changed and when i go to trnsaction me38

REPORT zbdc_me38
        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: file_path TYPE string.
DATA:
   l_log_handle TYPE balloghndl,
   l_s_log      TYPE bal_s_log,
   l_s_msg      TYPE bal_s_msg,
   l_msgno      TYPE symsgno.
DATA: i_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
*       messages of call transaction
DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
*       error session opened (' ' or 'X')
DATA:   E_GROUP_OPENED.
*       message texts
TABLES: T100.
DATA: BEGIN OF record OCCURS 0,
* data element: EVRTN
         EVRTN_001(010),
* data element: AUFEP
         EBELP_002(005),
* data element: TCSELFLAG
         TCSELFLAG_01_003(001),
* data element: ETNR1
         ETNR1_004(004),
* data element: LPEIN
         LPEIN_02_005(001),
* data element: EEIND
         EEIND_02_006(010),
* data element: ETMEN
         MENGE_02_007(017),
* data element: ETNR1
         ETNR1_008(004),
       END OF record.
START-OF-SELECTION.
   SELECTION-SCREEN BEGIN OF BLOCK mode WITH FRAME TITLE text-003.
   PARAMETERS: file_url TYPE  rlgrap-filename MODIF ID xyz .
   SELECTION-SCREEN END OF BLOCK mode .
INITIALIZATION.
   PERFORM log_create.
*PARAMETERS: dataset(132) lower case.
*perform open_dataset using dataset.
*Uploading data from the local file C:\MSchedule.txt
*CALL FUNCTION 'WS_UPLOAD'
* EXPORTING
*   FILENAME                      = 'C:\MSCHEDULE.TXT'
*   FILETYPE                      = 'DAT'
*  TABLES
*    data_tab                      = I_BDCDATA .
*IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file_url.
   CALL FUNCTION 'F4_FILENAME'
     EXPORTING
       program_name  = syst-cprog
       dynpro_number = syst-dynnr
       field_name    = ''
     IMPORTING
       file_name     = file_url.
start-of-selection.
   IF NOT file_url IS INITIAL.
     MOVE  file_url TO file_path.
     PERFORM read_file.
   ENDIF.
   LOOP AT record. "Filling the BDC table with data
*read dataset dataset into record.
perform bdc_dynpro      using 'SAPMM06E' '0205'.
perform bdc_field       using 'BDC_CURSOR'
                               'RM06E-EVRTN'.
perform bdc_field       using 'BDC_OKCODE'
                               '/00'.
perform bdc_field       using 'RM06E-EVRTN'
                               record-EVRTN_001.
perform bdc_dynpro      using 'SAPMM06E' '0222'.
perform bdc_field       using 'BDC_CURSOR'
                               'RM06E-EVRTP(01)'.
perform bdc_field       using 'BDC_OKCODE'
                               '=ET'.
perform bdc_field       using 'RM06E-EBELP'
                               record-EBELP_002.
perform bdc_field       using 'RM06E-TCSELFLAG(01)'
                               record-TCSELFLAG_01_003.
perform bdc_dynpro      using 'SAPMM06E' '1117'.
perform bdc_field       using 'BDC_CURSOR'
                               'EKET-MENGE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                               '/00'.
perform bdc_field       using 'RM06E-ETNR1'
                               record-ETNR1_004.
perform bdc_field       using 'RM06E-LPEIN(02)'
                               record-LPEIN_02_005.
perform bdc_field       using 'RM06E-EEIND(02)'
                               record-EEIND_02_006.
perform bdc_field       using 'EKET-MENGE(02)'
                               record-MENGE_02_007.
perform bdc_dynpro      using 'SAPMM06E' '1117'.
perform bdc_field       using 'BDC_CURSOR'
                               'RM06E-LPEIN(02)'.
perform bdc_field       using 'BDC_OKCODE'
                               '=BU'.
perform bdc_field       using 'RM06E-ETNR1'
                               record-ETNR1_008.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                               '=YES'.
perform bdc_transaction using 'ME38'.
*perform bdc_dynpro      using 'SAPMM06E' '0205'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RM06E-EVRTN'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '/00'.
*perform bdc_field       using 'RM06E-EVRTN'
*                              record-EVRTN_001.
*perform bdc_dynpro      using 'SAPMM06E' '0222'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RM06E-EVRTP(01)'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=ET'.
*perform bdc_field       using 'RM06E-EBELP'
*                              record-EBELP_002.
*perform bdc_field       using 'RM06E-TCSELFLAG(01)'
*                              record-TCSELFLAG_01_003.
*perform bdc_dynpro      using 'SAPMM06E' '1117'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'EKET-MENGE(02)'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '/00'.
*perform bdc_field       using 'RM06E-ETNR1'
*                              record-ETNR1_004.
*perform bdc_field       using 'RM06E-LPEIN(02)'
*                              record-LPEIN_02_005.
*perform bdc_field       using 'RM06E-EEIND(02)'
*                              record-EEIND_02_006.
*perform bdc_field       using 'EKET-MENGE(02)'
*                              record-MENGE_02_007.
*perform bdc_dynpro      using 'SAPMM06E' '1117'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RM06E-LPEIN(02)'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=BU'.
*perform bdc_field       using 'RM06E-ETNR1'
*                              record-ETNR1_008.
*perform bdc_dynpro      using 'SAPLSPO1' '0300'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=YES'.
*perform bdc_transaction using 'ME38'.
WAIT UP TO 2 SECONDS.
clear i_bdcdata[].
CLEAR record.
   ENDLOOP.
perform log_show.
*&      Form  BDC_DYNPRO
*       text
*      -->PROGRAM    text
*      -->DYNPRO     text
FORM bdc_dynpro USING program dynpro.
   CLEAR i_bdcdata.
   i_bdcdata-program = program.
   i_bdcdata-dynpro = dynpro.
   i_bdcdata-dynbegin = 'X'.
   APPEND i_bdcdata.
ENDFORM.                    "BDC_DYNPRO
**&      Form  BDC_FIELD
**       text
**      -->FNAM       text
**      -->FVAL       text
FORM bdc_field USING fnam fval.
   CLEAR i_bdcdata.
   i_bdcdata-fnam = fnam.
   i_bdcdata-fval = fval.
   APPEND i_bdcdata.
ENDFORM.                    "BDC_FIELD
*&      Form  BDC_TRANSACTION
*       text
*      -->TCODE      text
FORM bdc_transaction USING tc TYPE sy-tcode.
   DATA tcode LIKE tstc-tcode.
*  tcode = 'ME38'.
   CALL TRANSACTION tc    USING i_bdcdata
                    MODE 'E'  " modes can A = step by step foreground.
                               " mode N = background direct.
                               " mode E = using error display.
                    MESSAGES INTO  messtab.
   PERFORM msg_generation.
ENDFORM.                    "BDC_TRANSACTION
FORM read_file .
CALL FUNCTION 'GUI_UPLOAD'
   EXPORTING
      filename                       = file_path
      filetype                       = 'ASC'
      has_field_separator            = 'X'
*   HEADER_LENGTH                 = 0
      read_by_line                   = 'X'
*   DAT_MODE                      = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
* 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.
ENDFORM.                    " read_file
*&      Form  msg_generation
*       text
*  -->  p1        text
*  <--  p2        text
FORM msg_generation .
   DATA: l_mstring(480).
   DATA: l_subrc LIKE sy-subrc.
   DATA: l_error TYPE c.
   LOOP AT messtab.
*   add message to log file
     CLEAR l_s_msg.
     l_s_msg-msgty  = messtab-msgtyp.
     l_s_msg-msgid  = messtab-msgid.
     l_s_msg-msgno  = messtab-msgnr.
     l_s_msg-msgv1  = messtab-msgv1.
     l_s_msg-msgv2  = messtab-msgv2.
     l_s_msg-msgv3  = messtab-msgv3.
     l_s_msg-msgv4  = messtab-msgv4.
     CALL FUNCTION 'BAL_LOG_MSG_ADD'
       EXPORTING
         i_log_handle = l_log_handle
         i_s_msg      = l_s_msg
       EXCEPTIONS
         OTHERS       = 1.
     IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
     ENDIF.
     IF messtab-msgtyp EQ 'E' OR l_subrc NE 0.
       l_error = 'X'.
     ENDIF.
   ENDLOOP.
   CLEAR messtab[].
ENDFORM.                    " msg_generation
*&      Form  log_create
*       text
*  -->  p1        text
*  <--  p2        text
FORM log_create .
   CALL FUNCTION 'BAL_LOG_CREATE'
     EXPORTING
       i_s_log      = l_s_log
     IMPORTING
       e_log_handle = l_log_handle
     EXCEPTIONS
       OTHERS       = 1.
   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.                    " log_create
*&      Form  log_show
*       text
*  -->  p1        text
*  <--  p2        text
FORM log_show .
   DATA:
       l_s_display_profile TYPE bal_s_prof.
* get a prepared profile
   CALL FUNCTION 'BAL_DSP_PROFILE_SINGLE_LOG_GET'
     IMPORTING
       e_s_display_profile = l_s_display_profile
     EXCEPTIONS
       OTHERS              = 1.
   IF sy-subrc <> 0.
     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   ENDIF.
* use grid for display if wanted
   l_s_display_profile-use_grid = 'X'.
* set report to allow saving of variants
   l_s_display_profile-disvariant-report = sy-repid.
* when you use also other ALV lists in your report,
* please specify a handle to distinguish between the display
* variants of these different lists, e.g:
   l_s_display_profile-disvariant-handle = 'LOG'.
* call display function module
* We do not specify any filter (like I_S_LOG_FILTER, ...,
* I_T_MSG_HANDLE) since we want to display all logs available
   CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
     EXPORTING
       i_s_display_profile = l_s_display_profile
     EXCEPTIONS
       OTHERS              = 1.
   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.                    " log_show

It's not possible to delete an iCloud account.
You can turn off the services, but that doesn't delete the account.

Similar Messages

Maybe you are looking for

  • Hiding a column

    Hi, Can I hide a column in select query output? I have a Rank() function in my query for computing other results ,but i don't want to show the Rank() in the result output. Is it possible to hide it? Thanks Harhsini

  • ITunes 7 and downloaded video?

    Before upgrading I had downloaded 2 episodes of a tv show from the itunes store which played beautifully. When I went to buy the latest episode, it prompted me to upgrade, and reluctantly I agreed. I downloaded the show I wanted on the new version, a

  • BY PRODUCT Costing

    Can anyone guide me through Config steps for By Product cost in detail ? Thanks & Regards Radha

  • SLD Configuration for WEB As JAVA

    SDN TEAM, PLease can you send the screen shots for configuring SLD for WEB AS Java For valuable answer definity i will reward points Regards' CHANDU

  • Read table itab with key

    Hi, Unfortunately i've been almost a year out of abap,so its kinda rusty, so pls bear with my question. I've to develop this upload program, which would read from file, but the catchy part is that to filter out the records by either pernr, bukrs, sub