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

FM for currency conversion using base currency

$
0
0


Hi Experts,

 

We have a requirement as follows:

According to Polish VAT law, the VAT amount needs to be shown on their invoices in the local currency of the Polish Zloty (PLN) when invoice is issued in a foreign currency.

Hence, we have to convert invoice currency (which would be USD or EUR) to Polish currency (PLN).

A new exchange rate PLZD has been created for this and it will be updated into our system per OSS note 1286897.

Hence, in the TCURR table, we have the exchange rates maintained. However, the base currency is EUR.

So we have the rates maintained from the various currencies to EUR.  (Example: USD to EUR, PLN to EUR, etc..)

If we get the invoice in USD, we need to convert it to PLN.

Since direct conversion from USD to PLN is not maintained in TCURR, the function module CONVERT_TO_LOCAL_CURRENCY doesn't give any results.

Is there any function module available which takes the base currency (EUR) into consideration while converting from foriegn currency to local currency?

 

Please let me know.

 

Thanks.

Regards,

Anusha


find max value from internal table

$
0
0

DATA : BEGIN OF SUBVBPLP OCCURS   10,

       vendprodid like mara-mfrpn , 

       CUMQUANTITY  TYPE I ,

       PACKLISTID LIKE VBRK-VBELN,

       mfr_id(3) ,         

       debtorid(27),             

       END  OF SUBVBPLP.

SUBVPLP-CUMQUANTITY = 10.

APPEND .

SUBVPLP-CUMQUANTITY = 20.

APPEND.

 

I WANT TO FIND THE MAX VALUE FORM CUMQUANTITY . AND RESULT INTO ONE VARIBALE . PLS GIVE SUGGESTION TO GET MAX VALUE

Getting data from pcl4 in optimize way and optimization of code

$
0
0

Hi all,

 

Acutally I have two problems, first the report that I have assigned to make it better in performance, was actually created back in 2000.

In this there is lot of select endselect statemtns which makes the report slower then usual, and second thing which I felt it getting data from pcl4 cluster which make it more slow, I want to ask you guys, is there any  other way to read data from pcl4 which improve the performance of report, and plz do suggest me to alternative of way select and end select statement so I can use in my report, I thought to get data from database and save it into ITb then append the field, Is this the  better way of doing things compare to select end select statement. I am pasting the small part of code which i feel it slower the program, please suggest me the way, as I am tired to searched this solution in Google but not find any satisfactory solution.

 

WELL lcl4 is internal table.

 

 

select client
          relid
          srtfd
          srtf2
          histo
          aedtm
          uname
          pgmid
          versn
          clustr into
          (pcl4-client,
           pcl4-relid,
           pcl4-srtfd,
           pcl4-srtf2,
           pcl4-histo,
           pcl4-aedtm,
           pcl4-uname,
           pcl4-pgmid,
           pcl4-versn,
           pcl4-clustr)

        from pcl4
        where   relid eq 'SA'
and srtfd between
'A000000000000000000000000000000000000000000000000000000000000000000000'
  and
'A99999999FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'
         and     srtf2 eq '00'
         and     aedtm in aedtm
         and     uname in uname

         and     srtfd like itab_perno-pernr.



     move pcl4-srtfd to sh-key.


     check sh-key-infty in infty.

***********************************************
     check sh-key-bdate in aedtm"confirm this
*    check sh-key-pernr in perno.
***********************************************


     move: sh-key-tclas to lcl4-tclas,
           sh-key-bdate to lcl4-bdate,
           sh-key-btime to lcl4-btime,
           sh-key-seqnr to lcl4-seqnr,
           sh-key-pernr to lcl4-pernr,
           sh-key-infty to lcl4-infty.

     move: pcl4-relid to lcl4-relid,
           pcl4-uname to lcl4-uname.


     if aedtm-low is initial.
       select kostl plans from pa0001 into (lcl4-kostl, lcl4-plans)

         where pernr eq lcl4-pernr
          and werks eq werks
          and btrtl eq btrtl
          and kostl in kostl.
       endselect.


       select trfgr from pa0008 into lcl4-persk
         where pernr eq lcl4-pernr.
       endselect.

     elseif aedtm-high is initial.
       select kostl plans from pa0001 into (lcl4-kostl, lcl4-plans)
                   where pernr eq lcl4-pernr
                    and werks eq werks
                    and btrtl eq btrtl
                    and kostl in kostl
                    and begda le aedtm-low
                    and endda ge aedtm-low.

       endselect.

       select trfgr from pa0008 into lcl4-persk
         where pernr eq lcl4-pernr
          and begda le aedtm-low
          and endda ge aedtm-low.
       endselect.

     else.
       select kostl plans from pa0001 into (lcl4-kostl, lcl4-plans)
   where pernr eq lcl4-pernr
    and werks eq werks
    and btrtl eq btrtl
    and kostl in kostl
    and begda le aedtm-high
    and endda ge aedtm-high.

       endselect.

       select trfgr from pa0008 into lcl4-persk
         where pernr eq lcl4-pernr
          and begda le aedtm-high
          and endda ge aedtm-high.
       endselect.

     endif.
     select single kfzkz from pa0032
                     into lcl4-kfzkz
                     where pernr eq lcl4-pernr and
                           endda eq '99991231'.
     append lcl4.
   endselect.

endform.

In dynamic Selection screen I want check mandatory input field after pressing F8 or Execute Button?

$
0
0

Dear All,

 

I am making 3 radio button in dynamic selection screen.

 

if I make one input field of 2nd and 3rd radio button mandatory, than error is come if we are not fill that field and change radio button field.

 

I want to check mandatory field after execute button is press or after F8.

 

 

Awaiting for replay......

 

Regards,

Pooja 

Variant

$
0
0

Hi All,

 

         In selection screen I have 3 fields Plant, material number , po number. When I enter plant as 1000, I should not get a chance of creating a variant.

 

If plant is not 1000 I should get a chance for creating a variant.

 

Thanks in Advance.

Table Maintenance - Automatic Fill with Search Help

$
0
0

Dear all,

 

I have a ZTable to map Material Group 3 - MVGR3 with custom info.

 

MANDT

MVGR3

VOLUME

 

The main goal is to create a table maintenance with MVGR3 DESCRIPTION in it which automatically fill when selecting the search help.

 

To display the description is not a problem for me,

1st I can use table maintenance generator for the table itself, change the screen to display description, and add an event to fill the description

2nd I can create a view to join it with the text table, which is TVM3T and create table maintenance from that view, then I change the screen to put H_TVM3 as the search help.

 

With the 1st and 2nd, the description will not automatically be filled when selecting the search help.

The user must press ENTER first to fill the description.

 

Can the description be automatically filled? And how can I do it?

Because I tried in SE11 for the original search help H_TVM3, it can automatically fill the description.

 

Thanks

How to hide a selection screen comment ?

$
0
0

Hi Experts,

 

I have an issue in Interactive report...

I know by using  LOOP AT SCREEN we can modify screen elements like HIDE ... in the AT SELECTION-SCREEN OUTPUT event

 

But my question is i need to HIDE Selection screen comment also...I can this be achieved....???

Please do reply me with a solution...

 

Thanks in Advance...

Reddy Arun

How to check the change log of a variant

$
0
0

Dear Gurus,

 

I want to check the changes done (Change log) in a variant of a program. But i could not find any options around. Please suggest me how can I find the changes done on a variant.

 

 

Thanks in advance.

RathiM


SELECT statement query

$
0
0


Hello all,

         I understand this is a very basic question in ABAP. But, I was just having this doubt and would like to get it cleared before I move on with my development.

        

There is this piece of code:

 

 

  SELECT afield                                        
    FROM atable                                       
    INTO anothertable-afield                  
   WHERE afield EQ btable-afield            

     AND cfield EQ constantvalue.                           
  ENDSELECT.

 

 

Wanted to clarify whether the "ALL" the values from the btable will be compared with the afield values of atable. Or, do I need to loop this btable to ensure that all the values are compared one by one?

transfer order not creating based on handling units

$
0
0

Hi Experts,

 

we are creating a delivery order with 7 handling units , for each handling unit it should create a transfer order , but for  few cases it is creating  1 transfer order , instead of 7 transfer orders.

 

could you please suggest  what could be the  reason .we didn't  get any idocs with the TO number

 

Please  let me know.

 

advance thanks

Hot to remove button for a particular record in ALV lvc version

$
0
0

Hi,

 

i have created ALV using

 

'REUSE_ALV_GRID_DISPLAY_LVC' function module, in which am displaying buttons in a colomn.

 

Now i want to remove the button for few records based on some condition.How is it possible.

 

 

Regards,

Manoj.

BAPI_EQUI_CREATE Usage for equipment master creation in background

$
0
0

How should Equipment Master (IE01 / IE02) be created and updated in background, whenever Sales order is created or changed (VA01 / VA02) using BAPI_EQUI_CREATE. Could anyone help me with a detailed step by step procedure on what should be done.

Thanks in advance

SMTP configuration for sending mail out of SAP system

$
0
0

Hello Experts,

 

I am trying to send an email to XYZ@gmail.com, via a FM in my SAP system (CRM).

 

I have made the possible setting as per my understanding and reading different blogs via the T-code SCOT.

 

Unfortunately, I am not having success in this area.

 

When I check the status of the delivery via the T-code SOST, the system show me attempt failed with the following error text:

"Message cannot be transferred to node SMTP due to connection error (final)"

 

Could you kindly help me, which settings I might be missing or what extra needs to be followed.

 

Thanks and Regards,

Ashish Singh.

How to read get the payment method when reading from RT payroll table ?

$
0
0

I want to read the payroll payments from RT table, how to get the payment method for each entry in the RT table ?

Guidance on preparing learning content

$
0
0

Hello All,

 

We have a plan for creating video tutorials on various technical areas. The idea is to prepare some quality content and to give the users an option to purchase the learning content.

 

So we are looking for some guidance on this. Is there a point of contact from SAP or an email id to whom I can send the request and get the required details?

 


Thanks,

Kishore.


ME2DP - I want to find a BADI

$
0
0

Dear Experts,

     I have a situation, the standard Tcode ME2DP - Down Payment Monitoring for PO does not filter the output list based upon the Organizational Levels set in the Authorization for the role to which this tcode belongs (In other terms all the POs which have down payment are shown irrespective of Doc Type, Purch Group, Purch Org etc). Because of this reason, we have to make an enhancement in the standard program. So after making enough research i found that there is a BADI for the program RM06DPMONITOR. But i am not able to find it using the methods explained from experts like using the tcode SE24 (by putting the breakpoint for GET_INSTANCE) or by SE84 etc.

     Can anyone please tell me if is BADI or User Exit or any Implicit enhancement Point i should be looking for the  above Tcode.

 

Regards,

Azhar

Decimal Notations in Adobe FOrms

$
0
0

Hi,

 

I have a requirement to show the decimal notations in output forms based on the country specific setting in SPRO.

 

Is there any way to acheive this.

 

For eg: my netprice for France shows as 1 000,00 instead of 1.000,00.

 

THanks.

Coloring a Particular cell in SmartForm table

$
0
0

Hi,

 

Could any one please tell me the way to color a smartform table cell.

I can color a particular cell of template but can't find any way to color table cell.

ABAP Code Error

$
0
0

Hi Experts,

 

Please check and do the needful . I am getting the error as 

 

Error analysis

    An exception occurred that is explained in detail below.

    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught

     and

    therefore caused a runtime error.

    The reason for the exception is:

    In a SELECT access, the read file could not be placed in the target

    field provided.

    Either the conversion is not supported for the type of the target field,

    the target field is too small to include the value, or the data does not

    have the format required for the target field.

 

 

ABAP Code:

 

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

*& Report  ZPROXY_MAT

*&

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

*&

*&

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

 

 

REPORT  ZPROXY_MAT.

 

 

TABLES:ZMAT_TEST.

 

 

 

 

DATA:lt_mara TYPE STANDARD TABLE OF ZMAT_TEST ,

     ls_mara TYPE ZMAT_TEST.

DATA:client_proxy type REF TO ZCO_MATERIAL_SOURCE_SI,

     fs_mara TYPE ZMATERIAL_SOURCE_MATERIAL,

     t_mara TYPE ZMATERIAL_SOURCE_MATERIAL,

     ts_mara TYPE ZMATERIAL_SOURCE_MT,

     sys_fault TYPE REF TO cx_ai_system_fault.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE t1.

*.PARAMETERS:p_matnr TYPE ZMAT_TEST-MATERIAL_NMBER.

  Select-OPTIONS:s_matnr FOR ZMAT_TEST-MATERIAL_NMBER.

SELECTION-SCREEN end of BLOCK b1.

 

 

 

 

CREATE OBJECT client_proxy.

CREATE OBJECT sys_fault.

*t1='material'.

 

 

 

 

SELECT MATERIAL_NMBER

       MATERIAL_DESCRIP

       MAINTAIN_STATUS

       CREATEDBY

       CREATEDON

       from ZMAT_TEST into TABLE ls_mara where  MATERIAL_NMBER in s_matnr.

 

 

*  ENDSELECT.

  IF sy-subrc eq 0.

 

 

    LOOP AT lt_mara into ls_mara.

      WRITE:/ ls_mara-MATERIAL_NMBER,

              ls_mara-MATERIAL_DESCRIP,

              ls_mara-MAINTAIN_STATUS,

              ls_mara-CREATEDBY,

              ls_mara-CREATEDON.

    ENDLOOP.

  else.

 

 

    write:/'data not found'.

  ENDIF.

  sort lt_mara by MATERIAL_NMBER.

  READ TABLE lT_MARA  INTO ls_mara

    WITH KEY MATERIAL_NMBER = s_matnr BINARY SEARCH.

 

 

  fs_mara-MATERIAL_NUMBER = ls_mara-MATERIAL_NMBER.

  fs_mara-MATERIAL_DESCRIPtion = ls_mara-MATERIAL_DESCRIP.

  fs_mara-MAINTENANCE_STATUS = ls_mara-MAINTAIN_STATUS.

  fs_mara-CREATED_BY = ls_mara-CREATEDBY.

  fs_mara-CREATED_ON = ls_mara-CREATEDON.

 

 

  TRY.

      ts_mara-MATERIAL_SOURCE_MT-material = fs_mara.

      call method client_proxy->EXECUTE_ASYNCHRONOUS

              EXPORTING

          output = ts_mara.

      commit WORK.

      WRITE:/ 'data processed sucessfully'.

 

 

    CATCH  cx_ai_system_fault INTO sys_fault.

      write:/'system error'.

 

 

  ENDTRY.

 

Regards,

GIRIDHAR

Function Module for Download two or more internal table data in separate sheets in single excel

$
0
0

Hi,

 

I have 5 internal tables. each tables have different data.

 

I want to download the each internal table data to separate sheets in one excel file.

 

I want the function module for this.

 

 

You know the function module or some sample codes then kindly send to me.

 

 

Thanks in advance.

 

 

Ramesh N.

Viewing all 8332 articles
Browse latest View live


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