Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all 10425 articles
Browse latest View live

Re: Error while executing BAPI_INSPOPER_RECORDRESULTS

$
0
0

Hi Niranjan,

 

Thanks for your reply.

 

Under CHAR_RESULTS, I tried to enter the following:

INSPLOT = '030000003800', INSPOPER = '0010' , INSPCHAR = '0010', CLOSED = 'X', EVALUATED = 'X', EVALUATION = 'A',MEAN_VALUE = 914.5.

 

The SAMPLE_RESULTS and SINGLE_RESULTS table were kept blank.

 

There was no error message displayed.But when I go and check in QE01,the result value ie 914.5 do not appear but only a tick mark in the 'Valuation' column appears.

If I enter the values in the SINGLE_RESULTS table,error 'The inspected sample size does not correspond to the planned sample size' appears.On executing the BAPI for commit,the same thing happens ie.only a tick mark in the 'Valuation' column appears.

 

Kindly help where I am going wrong.


Re: how to update cats from Zprogram

$
0
0

@dipesh patil:-

really thank you 4 your fast response and help.And would you mind if u make the noting data entry profile and any sample screen shot!!

 

best regards,

HaHu

Re: Regarding ztable.

$
0
0

Hi,

From sm30 ,enter Your Ztable name,then In display/maintain mode, From menu (system>status>Go to screen & program).

Then Write program ,for user name You can use sy-uname.

 

Hope It helps.

Thanks.

Gourav.

Re: Error while executing BAPI_INSPOPER_RECORDRESULTS

$
0
0

Hi,

 

Try passing VALID_VALS in the SINGLE_RESULTS.

 

Cheers

~Niranjan

upload document file using gui_upload

$
0
0

Hello Team,

 

Can u please just how to upload a document file (.DOC file ) into SAP using gui_upload .I tried using ASC type and BIN ..It appears with symbols into internal table..

 

Please suggest.

 

Regards,

Geeta

Business Area and Business Place Mandatory

$
0
0

Hello All,

 

I want to write a BTE for making the Business Area and Business Place Mandatory.

Scenario is like

 

If Fiscal Year - 2013 then only Business Place should be Mandatory.

If Fiscal Year - 2012 then there are two cases -

1- If New Entries are being created then both Business Area and Business Place are Mandatory.

2 - If Clearing of Old Entry is being done, then there should be NO Error.

 

Any Suggestions how to implement this requirement.

 

Regards,

Jashan Koshal

Re: Problem in Table Maintainence generator event

$
0
0

Hello,

 

There are events called "Before saving the data in the database" and "Creating a new entry" . I think by coding in these events we will get your desire results.

 

Create a "Z" number range via SNRO, then define the range, like 1 to 999999. In the creating a new entry event write below code.

 

FORM f_automatic_increment

.

DATA: lv_num TYPE CMS_DTE_SEQNO.

 

    CALL FUNCTION 'NUMBER_GET_NEXT'

         EXPORTING

              nr_range_nr             = '01'

              object                  ='ZCBT_NUM' --> it's the object

         IMPORTING

              number                  = lv_num

         EXCEPTIONS

              interval_not_found      = 1

              number_range_not_intern = 2

              object_not_found        = 3

              quantity_is_0           = 4

              quantity_is_not_1       = 5

              interval_overflow       = 6

              buffer_overflow         = 7

              OTHERS                  = 8.

 

ZTQM_VBATCH_COPY-REC_INCREMENT = lv_num.

 

ENDFORM.

 

Also, please see this thread http://scn.sap.com/message/7474131.

Thanks,

 

Abhijit

Re: how to update cats from Zprogram

$
0
0

Hi Hahu,

 

It is the first screen in CAT2 transaction. You will have to choose appropriate data entry profile according to your client. Just go to transaction CAT2 and you will understand.

 

Regards,

Dipesh


Re: problem when increase line in smartforms template

$
0
0

hello,

   I have similar problem, when I implement 1837754 - "Smart Forms Resizing in table painter" it solve, hope to be valued for your issue.

 

Regards,

Amr Abdelazeez

Re: Problem in Table Maintainence generator event

$
0
0

Ji Jagan,

 

In TMG you create form routine 01 and 05.

 

In 05 you just create the next number from either your number range or incrementing last number by one.

 

In form routine 01 you check, the new nomber from database, else give error message.

 

 

Thanks

Srimanta

Re: Send Internal Table as Excel Attachment

$
0
0

Hi Jun,

     My reply got posted even before I completed it. Sorry for the inconvenience.

     here is my idea of solution to the problem.

 

     Inside the loop at gt_data, you are just concatenating data into lv_string and you are not appending it. As a result, after the loop execution lv_string variable will have only the data of last entry. So to avoid this, you can append data of lv_string into another string inside the loop. Use the newly created variable to create the attachment. Below is the sample code.

 

DATA : lv_string2 type string.

CLEAR lv_string2.

 

LOOP AT gt_data INTO gwa_data.
         CONCATENATE gwa_data-col1 gwa_data-col2 gwa_data-col3 INTO lv_string SEPARATEDBY lc_tabdel.

          CONCATENATE lv_string2 lv_string INTO lv_string2.

 

         CLEAR: gwa_data.
ENDLOOP.

TRY.

           cl_bcs_convert=>string_to_solix(

                     EXPORTING

                       iv_string   = lv_string2

                       iv_codepage = '4103'  "suitable for MS Excel, leave empty

                       iv_add_bom  = 'X'     "for other doc types

                     IMPORTING

                       et_solix  = binary_content

                       ev_size   = size ).

         CATCH cx_bcs.

           MESSAGE e445(so) INTO lv_message .

 

       ENDTRY.

 

Hope this helps,

~Athreya

Re: Send Internal Table as Excel Attachment

$
0
0

Hi ,

 

Thanks for your reply but the code will not work...

 

          APPEND lv_string TO lv_string2. --> Will lead to Error since lv_string2 is not internal table

 

           cl_bcs_convert=>string_to_solix(

                     EXPORTING

                       iv_string   = lv_string2      --> will lead to error, iv_string is meant for flat string only

                       iv_codepage = '4103'  "suitable for MS Excel, leave empty

                       iv_add_bom  = 'X'     "for other doc types

                     IMPORTING

                       et_solix  = binary_content

                       ev_size   = size ).

         CATCH cx_bcs.

           MESSAGE e445(so) INTO lv_message .

 

       ENDTRY.

Re: Deleting data from Data Buffer(import/Export from data buffer)

$
0
0

Maybe just:      FREE xcookie.

Re: load system date into an internal table ?

$
0
0

Hi Daniel,

 

Say your internal table name is TABLEA.

Also your internal table contains a date field say DATE1 which is of type SY-DATUM.

 

Then you can use below logic to load the SY-DATUM value to DATE1 field of all records of the internal table TABLEA.

 

Case-1: If your internal table TABLEA is with header line

 

LOOP AT TABLEA.

     TABLEA-DATE1 = SY-DATUM.

     MODIFY TABLEA TRANSPORTING DATE1.

CLEAR TABLEA.

ENDLOOP.

 

Case-2:  if the TABLEA internal table is with out header line, then declare a workarea X_TABLEA of type TABLEA.

 

then use the below logic.

 

LOOP AT TABLEA INTO X_TABLEA.

     X_TABLEA-DATE1 = SY-DATUM.

     MODIFY TABLEA FROM X_TABLEA TRANSPORTING DATE1.

CLEAR X_TABLEA.

ENDLOOP.

 

Hope this will help you.

 

Thanks & Regards,

Venugopal M N

Re: Budget update from held purchase order

$
0
0

Hi Shahzad,

 

Thanks for your answer.

The tolerance setting of availability is ok according to the FM fonctional consultant.

I'm searching function or programs called to update FM, any idea ?

These are the Badi called during the update

 

MD_STOCK_TRANSFER
ME_ACTV_CANCEL_PO
ME_CCP_ACTIVE_CHECK
ME_CHECK_ALL_ITEMS
ME_COMMITMENT_STO_CH
ME_COMMITMNT_PARKING
ME_DEFINE_CALCTYPE
ME_GUI_PO_CUST
ME_HOLD_PO
ME_PO_PRICING
ME_PO_PRICING_CUST
ME_PO_SC_SRV
ME_TAX_FROM_ADDRESS
ME_TRIGGER_ATP

 


I've implemented the BAdi ME_COMMTMNT_PO_REL_C to force the parameter "is_relevant" when the purchase order is held but it's not better.


Re: Send Internal Table as Excel Attachment

$
0
0

Hi,

     I have edited my reply. Please take a look at the changes done.

 

~Athreya

Re: FM to update table LIKP with fields BOLNR and ANZPK

$
0
0

Hi,

 

Were you able to find any solution to this issue ? I am facing similar requirement wherein I have to update BOLNR and TRAID field in LIKP using FM 'SD_IDOC_INPUT_PICKING', attached to Idoc message type SDPICK.

 

Thanks and Regards

          Vivek

Re: load system date into an internal table ?

$
0
0

Check MODIFY itab statement documentation first like in

l_s_datapak_line-xxxxx = sy-datum.
MODIFY datapak FROM  l_s_datapak_line TRANSPORTING xxxxx WHERE xxxxx NE sy-datum.

(Basic question - Read theRules of Engagement.)

 

Regards,

Raymond

Re: Send Internal Table as Excel Attachment

$
0
0

Hi 

 

Still no luck.

 

---------------

Full Code:

---------------

 

REPORT ysend_email.

* This example shows how to send
*   - a simple text provided in an internal table of text lines
*   - and an attached MS word document provided in internal table
*   - to some internet email address.
*
* All activities done via facade CL_BCS!

DATA: send_request       TYPEREFTO cl_bcs.
DATA: text               TYPE bcsy_text.
DATA: binary_content     TYPE solix_tab.
DATA: binary_content2     TYPE solix_tab.
DATA: document           TYPEREFTO cl_document_bcs.
DATA: sender             TYPEREFTO cl_sapuser_bcs.
DATA: custom_sender             TYPEREFTO cl_cam_address_bcs.
DATA: lo_sender          TYPEREFTO if_sender_bcs.
DATA: convert            TYPEREFTO cl_bcs_convert.
DATA: recipient          TYPEREFTO if_recipient_bcs.
DATA: bcs_exception      TYPEREFTO cx_bcs.
DATA: sent_to_all        TYPE os_boolean.

TYPES: BEGINOF gty_data,
         col1 TYPEc LENGTH 10,
         col2 TYPEc LENGTH 10,
         col3 TYPEc LENGTH 10,
        END   OF gty_data.
DATA: gwa_data TYPE gty_data.
DATA: gt_data  TYPESTANDARDTABLEOF gty_data.

START-OF-SELECTION.

   PERFORM main.


*---------------------------------------------------------------------*
*       FORM main                                                     *
*---------------------------------------------------------------------*
FORM main.

   TRY.
*     -------- create persistent send request ------------------------
       send_request = cl_bcs=>create_persistent( ).

*     -------- create and set document with attachment ---------------
*     create document from internal table with text
       APPEND'Hello world!'TOtext.
       document = cl_document_bcs=>create_document(
                       i_type    = 'RAW'
                       i_text    = text
                       i_length  = '12'
                       i_subject = 'Test Immediate' ).

*     add attachment to document
*     BCS expects document content here e.g. from document upload
*     binary_content = ...

       gwa_data-col1 = 'FirstName'.
       gwa_data-col2 = 'MName'.
       gwa_data-col3 = 'LastName'.
       APPEND gwa_data TO gt_data.
       CLEAR: gwa_data.
       gwa_data-col1 = 'First'.
       gwa_data-col2 = 'Middle'.
       gwa_data-col3 = 'Last'.
       APPEND gwa_data TO gt_data.


       CONSTANTS: con_cret TYPExVALUE'0D'"OK for non Unicode
                  con_tab TYPExVALUE'09'.   "OK for non Unicode
       DATA: lv_string TYPE string.
       DATA: lv_string2 TYPE string.
       DATA: sizeTYPE so_obj_len,
             lv_message TYPE string.
       CONSTANTS: lc_tabdel     TYPEcVALUE cl_abap_char_utilities=>horizontal_tab,
                  lc_newline    TYPEcVALUE cl_abap_char_utilities=>newline.

       DATA: lv_str_line LIKE solix-line.
       LOOPAT gt_data INTO gwa_data.
         CONCATENATE gwa_data-col1 gwa_data-col2 gwa_data-col3 INTO lv_string SEPARATEDBY lc_tabdel.
         CONCATENATE lv_string2 lv_string INTO lv_string2.
         CLEAR: gwa_data.
       ENDLOOP.
       TRY.
           cl_bcs_convert=>string_to_solix(
                     EXPORTING
                       iv_string   = lv_string2
                       iv_codepage = '4103'  "suitable for MS Excel, leave empty
                       iv_add_bom  = 'X'     "for other doc types
                     IMPORTING
                       et_solix  = binary_content
                       ev_size   = size ).
         CATCH cx_bcs.
           MESSAGE e445(so) INTO lv_message .

       ENDTRY.



       CALLMETHOD document->add_attachment
         EXPORTING
           i_attachment_type    = 'XLS'
           i_attachment_subject = 'My attachment2'
           i_att_content_hex    = binary_content.

*     add document to send request
       CALLMETHOD send_request->set_document( document ).

*     --------- set sender -------------------------------------------
*     note: this is necessary only if you want to set the sender
*           different from actual user (SY-UNAME). Otherwise sender is
*           set automatically with actual user.
       sender = cl_sapuser_bcs=>create( sy-uname ).
       CALLMETHOD send_request->set_sender
         EXPORTING
           i_sender = sender.

*     --------- add recipient (e-mail address) -----------------------
*     create recipient - please replace e-mail address !!!
       recipient = cl_cam_address_bcs=>create_internet_address(
                                         'name@domain.com' ).

*     add recipient with its respective attributes to send request
       CALLMETHOD send_request->add_recipient
         EXPORTING
           i_recipient = recipient
           i_express   = 'X'.

       send_request->set_send_immediately( 'X' ).


*     ---------- send document ---------------------------------------
       CALLMETHOD send_request->send(
         EXPORTING
           i_with_error_screen = 'X'
         RECEIVING
           result              = sent_to_all ).
       IF sent_to_all = 'X'.
         WRITEtext-003.
       ENDIF.

       COMMITWORK.


* -----------------------------------------------------------
* *                     exception handling
* -----------------------------------------------------------
* * replace this very rudimentary exception handling
* * with your own one !!!
* -----------------------------------------------------------
     CATCH cx_bcs INTO bcs_exception.
       WRITE: 'Fehler aufgetreten.'(001).
       WRITE: 'Fehlertyp:'(002), bcs_exception->error_type.
       EXIT.

   ENDTRY.

ENDFORM.                    "main

Re: load system date into an internal table ?

$
0
0

Hi Daniel,

 

Suppose your internal table is lt_dso and work area as wa_dso.

 

If you want to populate system date to your date field of internal table refer the code below.

 

Loop at lt_dso into wa_dso.

 

wa_dso-date = sy-datum.

modify lt_dso from wa_dso.

 

endloop.

Viewing all 10425 articles
Browse latest View live


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