Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

Updating New QTY at saving of PR in ME51n and saving PO in ME21n

$
0
0

Hello,

     I have a requirement where a PR for Service is created in ME51n.

The User enters a single line in line item as service. In line item details a tab with services table is maintained (ESLH, ESLL).

But in the line item the qty is set to 1 instead of total qty of that services inside that line item.

I checked with ME_PROCESS_REQ but I can't get the services there or the packno through which I can get the services of that line item and update the qty therein.

Any other BADI, USEREXIT or enahancement that woud allow me to do so.

And I need similar check when creating PO against this service PR.


SAP PDF opening with an error The file is damaged and could not be repaired. Local\EWH}@@8+hf!

$
0
0

Hi All,

 

Recently our system got upgraded from SAP Basis 640 to SAP ABA 702. After upgradition we are facing the issue while PDF creation.

 

PDF that is created when opened it is showing the error "The file is damaged and could not be repaired. Local\EWH}@@8+hf!"

 

Following code is used

 

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = lf_formname

IMPORTING

fm_name = lf_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

 

*----- error handling ------------

 

lf_ent_retco = sy-subrc.

IF sy-subrc = 1.

MESSAGE e004(ssfcomposer) WITH lf_formname.

ENDIF.

IF sy-subrc = 2.

MESSAGE e005(ssfcomposer) WITH lf_formname.

ENDIF.

PERFORM fr_protocol_update_i.

ENDIF.

 

*-- if it is faxed, changed its title to PO number--

 

IF lw_control_param-device = co_device_telefax.

lw_composer_param-tdtitle = lw_doc-xekko-ebeln.

ENDIF.

CALL FUNCTION lf_fm_name

EXPORTING

archive_index = toa_dara

archive_parameters = arc_params

control_parameters = lw_control_param

mail_recipient = lw_recipient

mail_sender = lw_sender

output_options = lw_composer_param

is_ekko = lw_doc-xekko

user_settings = ' ' "Disable User Printer

is_pekko = lw_doc-xpekko

is_nast = lw_nast_1

iv_from_mem = lf_from_memory

iv_druvo = lf_druvo_1

IMPORTING

job_output_info = lw_ssfcrescl

TABLES

it_ekpo = lw_doc-xekpo[]

it_ekpa = lw_doc-xekpa[]

it_pekpo = lw_doc-xpekpo[]

it_eket = lw_doc-xeket[]

it_tkomv = lw_doc-xtkomv[]

it_ekkn = lw_doc-xekkn[]

it_ekek = lw_doc-xekek[]

it_komk = lt_xkomk[]

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

lf_ent_retco = sy-subrc.

PERFORM fr_protocol_update_i.

ELSE.

lt_otf[] = lw_ssfcrescl-otfdata[].

ENDIF.

IF NOT lt_otf[] IS INITIAL.

REFRESH lt_lines[].

CALL FUNCTION 'CONVERT_OTF_2_PDF'

IMPORTING

bin_filesize = bin_filesize

TABLES

otf = lt_otf

doctab_archive = lt_docs

lines = lt_lines

EXCEPTIONS

err_conv_not_possible = 1

err_otf_mc_noendmarker = 2

OTHERS = 3.

CHECK sy-subrc = 0.

REFRESH output.

CLEAR bin_filesize.

LOOP AT lt_lines INTO lw_lines.

CLEAR lw_output.

ASSIGN lw_lines TO <lw_lines> CASTING.

MOVE <lw_lines> TO lw_output.

APPEND lw_output TO output.

DESCRIBE FIELD lw_output LENGTH lf_size IN BYTE MODE.

bin_filesize = bin_filesize + lf_size.

ENDLOOP.

ENDIF. "lt_otf.

 

This code was working fine earlier.

Let me know if any setting need or code changes need to be done

Change User Parameters ID from SU01

$
0
0

Hi Experts,

 

We are looking for means to change the user Parameter ID in background program. (We were able to change the roles through one of the BAPI but we couldn't find similar enhancement for changing User Parameter ID in user master record.)

 

The said enhancement should work in this sequence:

 

1. Delete the existing assigned Parameter IDs in particular User ID

2. Assign new Parameter IDs in particular User ID

 

Let us know if you need further inputs in this direction.

 

Thanks in advance for your help!

 

Pradip

Edit a user defined transaction code.

$
0
0

Hi guys,

 

I have create a transaction for my program and when I start it I have on the top menu from of the page a list defined by SAP. I would like to replace the menu 'Selections' with the menu 'Program'.

 

Where can I make this change?

 

Thanks.

Not able see Longchar data type data in table level

$
0
0

Hi

 

How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is 1024characters.

I try to download into excel but some special characters coming instead of numbers.

Error - Multiple lines are only supported for printing and in print view

$
0
0

Gurus,

 

I have checked in  SDN on this error but the number of fields length is less than 255.

 

There are 3 hotspot link in ALV which displays grids from the main ALV.

 

Still this error is not solved. Any clues please share

 

Regards

Change Record in Table Maintenace using Events

$
0
0

Hi,

 

I have a z table and have created table maintenanace for it. In my Z table I have below fields.

 

delivery no

delivery type

created on

created by

changed on

chnged by

 

When I am creating a new entry. Created on and Created by are geeting filled automatically using Event 05.

 

But, When I am trying to change the record any field. Change on and changed By are not getting filled in the maintenace screen as well as in database.

 

Please let me know how we can handle this.

 

Thanks in Advance.

 

Vikas

Alv OO program error Message no. 0K534

$
0
0

Hi expert,

 

        Everytime i hit enter or any command button the program prompt me an error message error.png

even though i already declare all my variables globally still the error is the same.

 

my global variable Declaration


DATA: gr_data     Type Ref To DATA.
          DATA: la_data     Type Ref To data.
          FIELD-SYMBOLS: <gt_data> TYPE STANDARD TABLE.

 

my Full source code.

 

me->get_data( CHANGING c_data = <f_tab> ).

 


METHOD get_data.

       GET REFERENCE OF c_data INTO la_data.
       move la_data TO gr_data. " pass to global variable


        assign gr_data->* to <gt_data>.
         IF gc_custom_container is initial.
           CREATE OBJECT gc_custom_container
               EXPORTING
                  container_name  = gv_mycontainer.
         ENDIF.

         if table is not bound.
            try.
                "// Create ALV Instance
                cl_salv_table=>factory(
                  exporting
                    r_container    = gc_custom_container
                    container_name = 'TC_MIXING'
                  importing
                    r_salv_table   table
                  changing
                    t_table        = <gt_data>
                 ).
              catch cx_salv_msg.                              "#EC NO_HANDLER
            endtry.

           "// Setup ALV Attributes
           functions = table->get_functions( ).
           functions->set_all( abap_true ).

           columns = table->get_columns( ).
           columns->set_optimize( abap_true ).

           try.
               column = columns->get_column( 'MANDT' ).
               column->set_technical( if_salv_c_bool_sap=>true ).
             catch cx_salv_not_found.                        "#EC NO_HANDLER
           endtry.
           "// Dispalay ALV Model
           table->display( ).

         else.
           table->refresh( ).
         endif.

 

ENDMETHOD

 

 

Any suggestions?

 

Thanks.

 



Hi Gurus, Doubt in Function module

$
0
0

Hi Gurus,

 

for creating a function module we have to create it under function group.

we can have lot of function modules under a funtion group. and we can have global variables here. it partly acts as class.

 

doubt here is how can we find how the global variables are getting filled.

i have a scenario, PM_PARTNER_CHECK_COMPLETE in this FM i have a global internal table XIHPA. i need to know how or when this global variable is getting filled.

 

 

Defining a parameter that can only be read on the screen and set in the variant?

$
0
0

Hi

 

Is it possible to define a parameter that can only be read (read only) but the value can be set in the variant.

 

For example.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-005.

PARAMETERS:   directory(40) type c OBLIGATORY.

PARAMETERS:   nr type i OBLIGATORY.

SELECTION-SCREEN END OF BLOCK 1.

The parameter "directory" should be set only in the variant and the value should be "read only" on the screen after selection of the variant.

 

Is possible to implement this? If yes, how?

ABAP - reading emails from Outlook server

$
0
0

Hello all!

 

I would like to develop an ABAP program that runs in the background to read emails from a specific Outlook account, saving its attachments in an Unix directory. The application server is Unix.

 

Has anyone developed something like this? Could you help me please?

 

Thank you very much!

 

Rubens W. Blättler

How to get Delivery & Billing Doc for a particular Sales Order? Correct the code.

$
0
0

Dear ABAP masters I am very new to ABAP programming and an SD consultant friend of mine asked me to develop a code wherein I must get Delivery and Billing Doc for the all sales order selected.. and I developed following code. But I get no data.. I checked the DB tables too there certainly is no data for the given VBAK-VBELN.. So I was wondering if U could guide me if my code is correct if not please help me correct my code.

 

Please forgive me if I did not follow any of the guidelines of SCN.

 

TABLES : VBRK.
DATA : BEGINOF WA_VBAK,
        VBELN LIKE VBAK-VBELN,
   ENDOF WA_VBAK.
DATA IT_VBAK LIKETABLEOF WA_VBAK.
DATA : BEGINOF WA_VBRK,
       VBELN LIKE VBRK-VBELN,
   ENDOF WA_VBRK.
DATA IT_VBRK LIKETABLEOF WA_VBRK.
DATA : BEGINOF WA_LIKP,
        VBELN LIKE LIKP-VBELN,
   ENDOF WA_LIKP.
DATA IT_LIKP LIKETABLEOF WA_LIKP.

DATA : BEGINOF WA_FINAL,
       VBELN_S LIKE VBAK-VBELN,
       VBELN_B LIKE VBRK-VBELN,
       VBELN_D LIKE LIKP-VBELN,
   ENDOF WA_FINAL.

DATA IT_FINAL LIKETABLEOF WA_FINAL.

TYPE-POOLS : SLIS.
DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.


SELECTION-SCREENBEGINOFBLOCK A WITHFRAMETITLETEXT-001.
SELECTION-SCREENSKIP.
SELECT-OPTIONS : SO_VBELN FOR VBRK-VBELN.
SELECTION-SCREENSKIP.
SELECTION-SCREENENDOFBLOCK A.

START-OF-SELECTION.

   SELECT VBELN FROM VBRK INTOTABLE IT_VBRK
     WHERE VBELN IN SO_VBELN.

   IFNOT IT_VBRK ISINITIAL.

     SELECT VBELN FROM LIKP INTOTABLE IT_LIKP
       FORALL ENTRIES IN IT_VBRK
        WHERE VBELN = IT_VBRK-VBELN.
   ENDIF.
   IFNOT IT_LIKP ISINITIAL.

     SELECT VBELN FROM VBAK INTOTABLE IT_VBAK
       FORALL ENTRIES IN IT_LIKP
       WHERE VBELN = IT_LIKP-VBELN.
   ENDIF.

*  LOOP AT IT_VBRK INTO WA_VBRK.
*
*    WA_FINAL-VBELN_B = WA_VBRK-VBELN.
*
*    READ TABLE IT_LIKP INTO WA_LIKP
*    WITH KEY VBELN = WA_VBRK-VBELN.
*
*    WA_FINAL-VBELN_D = WA_LIKP-VBELN.
*
*    READ TABLE IT_VBAK INTO WA_VBAK
*    WITH KEY VBELN = WA_LIKP-VBELN.
*
*    WA_FINAL-VBELN_S = WA_VBAK-VBELN.
*
*    APPEND WA_FINAL TO IT_FINAL.
*    CLEAR WA_FINAL.
*  ENDLOOP.

LOOPAT IT_VBAK INTO WA_VBAK.
   WA_FINAL-VBELN_S = WA_VBAK-VBELN.

   READTABLE IT_VBRK INTO WA_VBRK
   WITHKEY VBELN = WA_VBAK-VBELN.
   WA_FINAL-VBELN_B = WA_VBRK-VBELN.

   READTABLE IT_LIKP INTO WA_LIKP
    WITHKEY VBELN = WA_VBRK-VBELN.
   WA_FINAL-VBELN_D = WA_LIKP-VBELN.

   APPEND WA_FINAL TO IT_FINAL.
   CLEAR WA_FINAL.
   ENDLOOP.

   CALLFUNCTION'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
       I_PROGRAM_NAME         = SY-CPROG
       I_INTERNAL_TABNAME     = 'WA_FINAL'
     CHANGING
       CT_FIELDCAT            = IT_FCAT
     EXCEPTIONS
       INCONSISTENT_INTERFACE = 1
       PROGRAM_ERROR          = 2
       OTHERS                 = 3.
   IF SY-SUBRC <> 0.
     MESSAGEID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   ENDIF.


   CALLFUNCTION'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       I_CALLBACK_PROGRAM = SY-REPID
       IT_FIELDCAT        = IT_FCAT
     TABLES
       T_OUTTAB           = IT_FINAL
     EXCEPTIONS
       PROGRAM_ERROR      = 1
       OTHERS             = 2.
   IF SY-SUBRC <> 0.
     MESSAGEID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   ENDIF.

what is meaning of SE in se38

How to set custom delivery fields through a custom program

$
0
0

I created a custom tab in Delivery header using BADI LE_SHP_TAB_CUST_HEAD.

The tab contains a check box field which is output only.

But I have a requirement to set this field from another z program.

 

I tried using the FM's which i used to set and get screen values, but no use.

I saw BADI - LE_SHP_DELIVERY_PROC Method - SAVE_AND_PUBLISH_DOCUMENT but failed to implement this method in my z program.

How can i achieve this? Need your advice. Thanks.

PO Release strategy user exit

$
0
0

Hi,

I would like to change my manager id while doing PO release, I am using release code as 9. When release PO, its triggering user exit EXIT_SAPLEBNF_005 . How can update ACTOR_TAB with new processor id, I am not seeing any id with this table.

 

Thx


How to Upload Long Text into SAP Using Excel Sheet and SAVE_TEXT Function Module

$
0
0

Many times user may have requirement during uploading the data into SAP as below points.


  • Upload the Long Text into SAP Using Excel Sheet (i.e. here I am explaining about a PO Text in MM Screen).
  • Long Text Readable within text area no need to use horizontal bar

 

l0.png

Screen Shot # 1

 

 

Solution:

 

  •   Create a Copy of “ALSM_EXCEL_TO_INTERNAL_TABLE” SAP Standard Function Module

           into Custom Function Module “YALSM_EXCEL_TO_INTERNAL_TABLE” .

 

 

L1.png

Screen Shot # 2

 

 

L2.png

Screen Shot # 3

 

Create a “Z” Copy of “ALSMEX_TABLINE” and Increase the “Value” Field Size i.e. here I am use 2000 character , you can take as per your requirement .

 

L3.png

Screen Shot # 4

 

 

 

  •   Create Custom Upload Program using above Custom Functional Module.

 

 

 

"Data Declaration

 

  TYPES: BEGIN OF TY_ITAB ,

         MATNR(18)    TYPE C,

         LMAKTX(2000) TYPE C,

         ROW TYPE I,

         TSIZE TYPE I,

         END OF TY_ITAB.



"
Data Declarations - Internal Tables

DATA: I_TAB          TYPE STANDARD TABLE OF TY_ITAB  INITIAL SIZE 0,

       IT_EXLOAD      LIKE ZALSMEX_TABLINE  OCCURS 0 WITH HEADER LINE,

       IT_LINES       LIKE STANDARD TABLE OF TLINE WITH HEADER LINE,

       IT_TEXT_HEADER LIKE STANDARD TABLE OF THEAD WITH HEADER LINE,

       WA             TYPE TY_ITAB ,

       P_ERROR TYPE  SY-LISEL ,

       LEN TYPE I .



"Selection Screen

 

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.

PARAMETERS:PFILE TYPE RLGRAP-FILENAME OBLIGATORY, “Excel File Name with Path

           W_BEGIN TYPE I OBLIGATORY,                                      “Excel Row beginning

           W_END TYPE I OBLIGATORY.                                          “Excel End Row     

SELECTION-SCREEN END OF BLOCK B1.

 

AT SELECTION-SCREEN.

  IF PFILE IS INITIAL.

    MESSAGE S368(00) WITH 'Please input filename'. STOP.

  ENDIF.

 

START-OF-SELECTION.

 

REFRESH:I_TAB.

  PERFORM EXCEL_DATA_INT_TABLE.   

  PERFORM EXCEL_TO_INT.

  PERFORM CONTOL_PARAMETER.

 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR PFILE.

  PERFORM F4_FILENAME.

 

“ F4 Help getting Excel File Name with Comlete Path

FORM F4_FILENAME .

  CALL FUNCTION 'F4_FILENAME'

  EXPORTING

    PROGRAM_NAME        = SYST-CPROG

    DYNPRO_NUMBER       = SYST-DYNNR

  IMPORTING

    FILE_NAME                  = PFILE .

ENDFORM. 

 

 

“Read Legacy Data Transfer from Excel using Custom Function Module

FORM EXCEL_DATA_INT_TABLE .

  CALL FUNCTION 'YALSM_EXCEL_TO_INTERNAL_TABLE'

    EXPORTING

      FILENAME    = PFILE

      I_BEGIN_COL = '0001'               “Excel Beginning Column           

      I_BEGIN_ROW = W_BEGIN     

      I_END_COL   = '002'                  “Excel End Column    

      I_END_ROW   = W_END                                  

    TABLES

      INTERN      = IT_EXLOAD.

ENDFORM.                    " EXCEL_DATA_INT_TABLE

 

 

 

“Transfer Excel data into internal table

FORM EXCEL_TO_INT .

  LOOP AT IT_EXLOAD .

    CASE  IT_EXLOAD-COL1.

      WHEN '0001'.

        WA-MATNR   = IT_EXLOAD-VALUE.        “Material Number Leading with Zero

      WHEN '0002'.

        WA-LMAKTX   = IT_EXLOAD-VALUE.      “ Material Long Text

    ENDCASE.

    AT END OF ROW1.

      WA-TSIZE = STRLEN( WA-LMAKTX ) .         “Finding String Length using STRLEN

      WA-ROW = IT_EXLOAD-ROW1 .                  “Adding Current Row Num into Internal table    

      APPEND WA TO I_TAB.

      CLEAR WA .

    ENDAT.

  ENDLOOP.

ENDFORM.                    " EXCEL_TO_INT

 

 

“Maintain Header, Item data and pass into “SAVE_TEXT” to save to Long Text

FORM CONTOL_PARAMETER.

  DATA OFF TYPE I VALUE '0'.

  LOOP AT I_TAB INTO WA.

    * Create Header

    IT_TEXT_HEADER-TDID     = 'BEST'.                 “ Text ID for Material Master

    IT_TEXT_HEADER-TDSPRAS  = SY-LANGU .    “ Login Language Key

    IT_TEXT_HEADER-TDNAME   = WA-MATNR.     “Material Number leading with Zero 

    IT_TEXT_HEADER-TDOBJECT = 'MATERIAL'.     “ Text Object

 

 

    MOVE WA-TSIZE TO LEN .    

 

 

    LEN =  LEN / 53  + 1.                                           “Finding Number of Row’s taken by Long Text

 

 

    “ Note :  Number of Row Required for Long Text Display

              = Total length of long text / Number Character’s in one Row + 1 

               Here I am taken 53 number of character in each row ,

               because in Material Master Long Text Area Display 53 Character without using Horizontal Bar . "

 

 

    DO LEN TIMES .

      MOVE '*' TO IT_LINES-TDFORMAT.

      MOVE  WA-LMAKTX+OFF(53) TO IT_LINES-TDLINE.

      SHIFT IT_LINES-TDLINE LEFT DELETING LEADING ' '.

      OFF = OFF + 53 .

      APPEND IT_LINES.

      CLEAR IT_LINES .

    ENDDO.

 

Using SAVE_TEXT Functional Module Save Long Text to SAP

    AT END OF ROW.

      CALL FUNCTION 'SAVE_TEXT'                  

        EXPORTING

          CLIENT                     = SY-MANDT

          HEADER                   = IT_TEXT_HEADER

          INSERT                     = ' '

          SAVEMODE_DIRECT = 'X'

        TABLES

          LINES                        = IT_LINES

        EXCEPTIONS

          ID                              = 1

          LANGUAGE               = 2

          NAME                        = 3

          OBJECT                     = 4

          OTHERS                    = 5.

* Check the Return Code

      IF SY-SUBRC <> 0.

        MESSAGE ID SY-MSGID TYPE SY-MSGTY

            NUMBER SY-MSGNO

              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 INTO P_ERROR.

        EXIT.

      ENDIF.

      CLEAR: WA ,LEN , OFF.

      REFRESH IT_LINES .

    ENDAT.

  ENDLOOP.

ENDFORM.                    " CONTOL_PARAMETER

 

 

  • Output

 

L12.png

Screen Shot # 13

 

 

L13.png

Screen Shot # 14

 

 

l00.png

Screen Shot # 15

 

 

Reference :

 

Note 933420 - ALSM_EXCEL_TO_INTERNAL_TABLE

 

 

Regard's

Smruti

 

 

 

 


 


module pool- fill all entries

$
0
0

Hi..

  I've developed a module pool screen in which the fields are mandatory and 2 pushbuttons CLEAR and EXIT.

  I've defined EXIT as MODULE EXIT AT EXIT-COMMAND and so as CLEAR.

BUT CLEAR is not working. it is showing error message 'fill in all entries'. i'm are not using any gui status only the screen attributes in which function type is defined as E.

   Please help........

Delete dataset does not work after upgrade in Ecc 7.01

$
0
0

Hello everyone,

 

 

We had a Test system that just been upgraded and there was programs that read file and delete from server.

 

İts standard SAP code!!

 

İ simplified it and foun found out that

 

delete dataset <fıle_name> doesnt work!!!

it works in all systems except this upgraded one, other systems havent been upgraded!!

 

Code is like this:

 

I looked at snotes: 18273

 

The auth object i check works fine but delete dataset returns subrc 4 and fails to delete!!

 

*&---------------------------------------------------------------------*

*& Report  ZZZ_MC_ALV1

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

 

"\\172.20.7.93\entegrasyon$

 

REPORT ZZZ_SOLEN_ALV1.

 

TYPE-POOLS SABC.

 

 

 

data: gv_line type string.

data: full_name type string.

data: lv_message(100).

 

 

DATA myref TYPE REF TO CX_SY_FILE_AUTHORITY  .

DATA err_text TYPE string.

 

"E:\USR\SAP\ENTEGRASYON\ISLENMEMIS\XX.TXT

FULL_NAME = 'e:\usr\sap\entegrasyon\islenmemis\xx.txt'.

 

 

 

write:sy-subrc.

 

 

break sdogan.

DATA: lv_file_name type AUTHB-FILENAME.

 

lv_file_name = full_name.

 

**Check the auth object

CALL FUNCTION 'AUTHORITY_CHECK_DATASET'

      EXPORTING  PROGRAM          = SY-REPID

                 ACTIVITY         = sabc_act_delete

                 FILENAME         = lv_file_name

      EXCEPTIONS NO_AUTHORITY     = 1

                 ACTIVITY_UNKNOWN = 2.

 

 

write:sy-subrc.

 

 

   open dataset full_name for input message lv_message

     in text mode encoding non-unicode.

   write:/ 'Open dataset:' , sy-subrc.

 

   do.

     read dataset full_name into gv_line.

     if sy-subrc eq 0.

       write:/ gv_line.

     else.

       exit.

     endif.

   enddo.

   close dataset full_name.

   write:/ 'Close dataset:' , sy-subrc.

 

 

   delete dataset full_name.

   write:/ 'Delete dataset:' , sy-subrc.

 

 

*form backup_file using pv_in_dir

*                       pv_in_backup_dir type salfile-longname

*                       pv_fname like gt_infiles-name.

*  data str type string.

*  data cmd(256)  type c.

*  data: lt_list(250) occurs 50 with header line.

*

*  clear: lt_list, lt_list[].

*  concatenate 'CACLS' ',' c_in_dir pv_fname ',/E,/P,EVERYONE:F'

*              into str.

*  translate str using ', '.

*  cmd = str.

*  call 'SYSTEM' id 'COMMAND' field cmd

*                id 'TAB'     field lt_list-*sys*.

*

*  clear: lt_list, lt_list[],cmd,str.

*  concatenate 'copy' ',' pv_in_dir pv_fname ','

*              pv_in_backup_dir pv_fname into str.

*

*  translate str using ', '.

*  cmd = str.

*  call 'SYSTEM' id 'COMMAND' field cmd

*                id 'TAB'     field lt_list-*sys*.

*

*  check sy-subrc eq 0.

*

*  " yedeği alınmış dosya silinir

*  delete dataset full_name.

*  if sy-subrc is initial.

 

*  endif.

*

*endform.                    " backup_file

when downloading to excel sheet leading zeros are truncated

$
0
0

Hi,

I am downloading the Internal table datas into Excel sheet using

 

    CALL METHOD cl_gui_frontend_services=>gui_download.

 

The laeding zeros of fields are truncated, how to bring these zeros in excel sheet.

 

My requirement is exactly the datas of internal tables should be copied to Excel sheet without any truncations of leading zeros,Is there any FM which can convert exactly to excel sheet.

 

 

With Thanks,

Dina

Relationship Between VBRK & ESSR or ESLL

$
0
0

HI,

     i am creating one report for comparing Invoice Data and  Service Entry Sheet. but there is not any relationship  between vbrk and essr or esll. pl give me solution i am  waiting for reply. thanks in advance.

Regards,

Rakesh

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>