Quantcast
Channel: SCN : Unanswered Discussions - ABAP Development
Viewing all 8768 articles
Browse latest View live

CDS CURRENCY CONVERSION (ABAP on HANA)

$
0
0

Hi All,

 

I'v tested CDS with currency conversion versus the classical approach with the function module for currency converion on application layer (CONVERT_AMOUNT_TO_CURRENCY). The classical approach seemed to be much faster, so I started testing.

 

Please find attached the objects used for testin:

  • y_cds_test_currconv.txt -> Simple ABAP report with both options
  • Y_CDS_TEST_CURRCONV.txt -> The CDS view

 

I test on a system with AS ABAP 7.4 SP8 + HANA SP 8 and also AS ABAP 7.4 SP8 + HANA SP 9.

 

There's actually an OSS, but the it's refering to Oracle DB and not HANA DB (2067294).

 

Native SQL statment (tracing done with ST05)

 

SETSCHEMA"SAPMDE";

SELECT

   "CARRID",

   "CONNID",

   "FLDATE",

   "SOURCE_PRICE",

   "SOURCE_CURRENCY",

   "TARGET_AMOUNT",

   "TARGET_CURRENCY"

  FROM

    "YTESTCUR" ( "TO_CURRENCY" => 'EUR' ,

                              "EXC_DATE" => '20150427' ) "YTESTCUR"

  WHERE

    "MANDT" = '100'


Result

native_sql.gif

 

Change the CDS and replace the CURRENCY_CONVERSOIN by table field PRICE. (to check if the slow performance is cause by the currency conversion function)
cds_change.jpg

Result run native SQL statement:

cds_change_result.jpg

 

I have also run the SAP HANA Plan Visualizer, refer the next screenshots.

 

visualizer1.jpg

 

visualizer2.jpg

visualizer3.jpg

 

It seems to me that the currency conversion has some performance issue. Has anybody experienced the same and maybe found a solution?

 

One final remark: for testing you need to have data in FLIGHT model. (Go to SE38 and run SAPBC_DATA_GENERATOR to generate data)

 

Thanks in advance.

 

Best Regards,

 

Bart


Question about exit EXIT_SAPLKASC_001

$
0
0

Hello,

 

We have a requirement to use EXIT_SAPLKASC_001 as we need to calculate overheads based on output quantity. All the configuration setup is completed and we have activated the exit. We also see that exit is being accessed during cost calculation and process order creation/release, Overhead calculation, variance calculation. During break point we were able to manually pass the fiscal year, fiscal period, quantity and unit of measure and overhead calculations were performed as expected.


Our issue is with data available in import parameters. During cost calculation (transaction CK11N/CK40N) we don't find a parameter that holds costing lot size quantity, unit of measure, fiscal year and period pertaining to effective date of cost calculation. Similarly during process order release (COR1), OH calculation (KGI2/CO43), variance calculation (KKS1/KKS2) we don't see order quantity, goods receipt quantity, unit of measure in any of the input parameters.


Is there something we are missing? I_KOMK/I_KOMP have some data but no such information and same of I_COIOB. Any clues?


Thanks in advance.


Regards,

Subodh

UI5 Development - Questions

$
0
0

Hi people,

 

Sorry if i'm at wrong place, but i have some questios about how to develop UI5 applications.

 

For your acknowledge, my environment is:

- SAP ECC 6.0 - EhP 5

- SAP NetWeaver AS ABAP 7.31

- SAP EHP 2 para SAP NetWeaver 7.0 (for NF-e)

- SAP SOLUTION MANAGER 7.1

 

My basic question is to know in which system the configuration must to be set to work oData and other components to develop UI5.

 

After all if someone could give me an orientation for which way i have to go, i'll appreciate.

 

Thanks in advance.

 

Regards,

Gustavo Prado

Dynamic Field Symbols with Structures

$
0
0

Hello,

 

I am stuck on a piece of code and looking for some help.  I am trying to figure out how to assign values in a structure of a dynamically defined field symbol to the structure inside another dynamically defined field symbol.  Here is my code and some comments.  Basically I am uploading data via a flatfile and placing it into a dynamically defined field symbol.

 

 

DATA:   

lr_area     TYPE REF TO cl_sem_planarea_attributes, 

lr_t_data   TYPE REF TO data, 

lr_s_data   TYPE REF TO data, 

lr_s_chas   TYPE REF TO data, 

lr_s_kyfs   TYPE REF TO data.

 

FIELD-SYMBOLS:      

<lt_data> TYPE STANDARD TABLE,    

<ls_data> TYPE ANY,    

<ls_chas> TYPE ANY,    

<ls_kyfs> TYPE ANY.

 

DATA: ls_chasel TYPE upc_ys_chasel,     

ls_charng TYPE upc_ys_charng.

 

FIELD-SYMBOLS:

<f> TYPE ANY,              

<chas> TYPE TABLE,              

<kyfs> TYPE ANY. 

 

CALL METHOD cl_sem_planarea_attributes=>get_instance   

EXPORTING       i_area      = i_area   

RECEIVING       er_instance = lr_area. 

 

CHECK sy-subrc = 0. 

CREATE DATA lr_s_data TYPE (lr_area->typename_s_data). 

ASSIGN lr_s_data->*   TO <ls_data>. 

 

CREATE DATA lr_t_data TYPE (lr_area->typename_t_data). 

ASSIGN lr_t_data->*   TO <lt_data>. 

 

CREATE DATA lr_s_chas TYPE (lr_area->typename_s_chas). 

ASSIGN lr_s_chas->*   TO <ls_chas>. 

 

CREATE DATA lr_s_kyfs TYPE (lr_area->typename_s_kyfs). 

ASSIGN lr_s_kyfs->*   TO <ls_kyfs>. 

 

LOOP AT gt_file INTO ls_file.   

CLEAR <ls_data>.   

MOVE-CORRESPONDING ls_file TO <ls_kyfs>. " Map key figures   

MOVE-CORRESPONDING ls_file TO <ls_chas>. " Map chars

*    MOVE-CORRESPONDING ls_file TO <ls_data>. " Map data

*        ASSIGN COMPONENT 'ls_chas' OF STRUCTURE <ls_Data> TO <chas> .

*        IF sy-subrc = 0.

**          <chas> = <ls_chas>.

*MOVE-CORRESPONDING <ls_chas> to <chas>.

*        ENDIF.     

<chas> = <ls_chas>.     

LOOP AT <chas> INTO ls_chasel.     

READ TABLE ls_chasel-t_charng INTO ls_charng INDEX 1.     

IF sy-subrc = 0 AND ls_charng-option = 'EQ'.       

ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE <ls_chas> TO <ls_data>.       

 

IF sy-subrc = 0.         

<ls_data> = ls_charng-low.       

ENDIF.     

ENDIF.   

ENDLOOP.   

 

COLLECT <ls_data> INTO <lt_data>. 

ENDLOOP.

 

Ls_chasel has 2 components:

Chanm (a char 30 which contains the component’s name)

T_CHARNG (a table with values for chanm)

 

Ls_data has 2 components:

S_chas (a structure with a list of components and values – same list as would have)

S_kyfs (a structure with a list of components and values – same list as would have)

 

Lt_data is a table of ls_data

 

I need to get the data in ls_chas into the ls_chas structure of ls_data and the ls_kyfs data into the ls_kyfs structure of ls_chas and append ls_chas to lt_data.  Anything that is commented out is something I tried that didn't work.  RIght now I get a dump at the 'loop at <chas> into ls_chasel' that the field symbol is not assigned.

 

Thanks for your help!

Customer tab on VL02N overview screen - Back button issue

$
0
0

Dear Experts,

 

I built a customer tab with a table control on delivery (VL02N) overview screen using BADI LE_SHP_TAB_CUST_OVER and LE_SHP_DELIVERY_PROC, everything is working with respect to data. Save is working as expected however a small issue with back button.

 

After making a change in the customer tab and back button is hit, there's no prompt for "do you want to save your data?"

 

Any ideas please.. I found something about screen sequences via VFBS Tcode maintaining T185 tables with Function codes but i do not have any function codes in my customer tab.


In standard SAP delivery, if a change is made and back button is hit without save, the following message is displayed.

 

Thanks in Advance.

Rajesh

Untitled.png

CSL_TOKENMGMT022 error message when executing WS_DELIVERY_UPDATE

$
0
0

Hi everyone

 

Currently I have an issue when trying to create a sales document and create a delivery number. Currently I´m creating an ABAP application that creates a sales document by using BAPI BAPI_SALESORDER_CREATEFROMDAT2, create a delivery number using BAPI BAPI_OUTB_DELIVERY_CREATE_SLS and post goods and close de delivery using FM WS_DELIVERY_UPDATE in that order. After executing the last FM I receive the following error:

 

CSL_TOKENMGMT022 - CSL: R3D210:SALES_DOCUMENT:XXXXXXXXXX is locked by <ECCUsername> (R3D210-01).

 

I'm pretty sure that the issue is something related to the time required to commit the changes made by BAPI BAPI_OUTB_DELIVERY_CREATE_SLS, but after reading several post they don´t recommend to use the sentence WAIT UNTIL... when commiting changes to the database. I try to use FM BAPI_TRANSACTION_COMMIT with the parameter WAIT activated but no luck at all.

 

Is there a way to remove the delivery lock after the executing of the BAPI BAPI_OUTB_DELIVERY_CREATE_SLS?

Or better yet: Is there a recommended way to execute the BAPI WS_DELIVERY_UPDATE after ensuring that the BAPI BAPI_OUTB_DELIVERY_CREATE_SLS correctly finishes it's execution?

 

The code that I have so far is the txt attached to this discussion.

 

Thanks in advance for your help. Best regards.

 

Lorenzo Martín Olmos

New OpenSQL (7.4SP8) compare these select statements

$
0
0

With the new enhancements to OpenSQL I think these two select statements are equivalent:

 

  select point, atinn, psort    into table @data(lt_mpoints)       from equi join imptt        on   eqart = @c_eqtyp_template        and  objnr = imptt~mpobj.
  select point, atinn, psort    into table @data(lt_mpoints)       from equi join imptt        on  objnr = imptt-mpobj        where eqart = @c_eqtyp_template.

Is there any advantage of using one over the other?

Invoice text(SGTXT) is not updating in payment proposal line items

$
0
0

Hi,

 

While doing payment proposal in F110, invoice text is not updating in payment proposal line items, which is available in ‘BSIK’  table.


Please find the attached screen shot. How to resolve this issue.


IN CJI5 transaction how the commitment cost is calculated

$
0
0

Hi Experts

 

   

I want know about calculation of commitment cost in standerd prog RKPEP005.

 

actually i tried to find in coding by dubuging  but unable to find it. for referance see below snap.

 

please share how to calculate these two clomn in standerd report  RKPEP005.Untitled.jpg

 

 

 

please share how to calculate these two clomn in standerd report  RKPEP005.

Sap Script Image

$
0
0

Hi Gurus,

 

The issue is i have Purchase order print in which the last few lines contains the signature of the authorized person till now this is done manually,now the requirement is to print a image which contains the respective signature of person who released the purchase order lately.

 

Problem here is i can't modify the format here(to add signature at last in Footer) ,i was trying to insert image before the line SIGNATURE by inserting the graphics through SE78 and calling it in script like below ,but the image is not displayed in that line ,how to achieve this

 

BITMAP 'ZSIGN' OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100

 

 

 

Regards,

Pavan

Select single for update * fails even though data is available in table

$
0
0

Hi Experts,

 

Need your assistance here, when i use the below select statement to fetch the records from SFLIGHT table, my select gets failed, please help me on this.

 

sy-subrc.pngtable.png

And if use the statement, select single * for update by replacing the above select statement, I the error " for update is not expected". Please help me to resolve these two error.

Dependent idoc message not created when using BD64 filter

$
0
0

In ECC I want to use a filter on account group to send only DEBMAS_CFS messages for payer and sold-to.

Whenever an DEBMAS_CFS is triggered, the address and contact data needs to be triggered too, so ADRMAS and ADR3MAS idocs are needed.

 

Based on instructions in SAP Note "1675599 - Receiver Determination Address IDocs" i set the dependencies:

 

bd64_depend.png

 

Without the filter on account group, DEBMAS_CFS, ADRMAS and ADR3MAS idocs are created.

With the filter active, like in the picture above, only DEBMAS_CFS idocs are created (BD12/change pointers).

 

What step am i missing here?

BAPI_BUS2002_ACTELEM_CHANGE_M bapi slow performance

$
0
0

We are using the BAPI_BUS2002_ACTELEM_CHANGE_M bapi to change activity elements in a project.  The project has over 600 activity elements.  Changing one with the bapi takes over 2 minutes.  The performance of the bapi seems to be proportional to the number of elements in the project.

FSCM -Credit Management BADI_SD_CM

$
0
0


Hello,

 

We are copied Example implementation in the BADI_SD_CM and our project dont have XI / PI.  To using Direct Update we buy pass the XI PI in the method FSCM_CREDIT_CHECK_ORDER. Its working fine while creating sales order  and message also populated .

 

But Credit exposure not getting updated in the backend.  I have set break point in all the methods and i ahve checked the menthod FSCM_COMMITMENT_UPDATE_ORDER not getting triggered.

 

Can any one help me how to update the credit exposure ? Any config issue or any code need to chnage in the BADI. Please suggest

 

Regards

Prabu K

Issue with Write Syntax

$
0
0

Hi Gurus,

I'm having weird issue with write syntax.

I'm writing an amount field into character variable to get the amount in currency format. The code is inside and adobe form interface.

Even though my user profile has Decimal Notation as 1,234,567.89 the amount are coming out as 1.234.567,89.

Apparently I'm not having this issue when the code is placed in SE38 program.

 

I need to do that above because I have to concatenate few other variables with the amount field to display on the form. And the amounts need to have thousands comma separation.

I have used standard conversion modules and also CURRENCY extension. No luck.

I'm going nuts. I hope I'm not missing anything silly.

 

Please advise.

 

Thx.

shyam


Vendor Outbound IDoc and Unblock Indicator...

$
0
0

Hi All,

 

I am using an outbound IDoc to pass on the information of vendor master to a legacy system via PI. Basic type I am using for the same is CREMAS05.

 

Now, when I am unblocking a vendor via XK05 and when I am changing the data of vendor, I am not able to make a difference between these 2 scenarios.

 

If vendor data is changed, I need to send the legacy system an action flag as 'C'; if vendor is unblocked, I need to send the legacy system an action flag as 'U'.

 

So, could somebody please let me know how can I differentiate based on IDoc data if vendor is changed or is unblocked.

 

Any suggestions are really appreciated.

 

Thanks in advance.

 

Regards,

Richa

Deserializing error - Byte-Offset in XML

$
0
0

Hi SAP gurus,

 

I have created an ECC proxywith it corresponding logical port but when I test it using tcode SE80 I get the following error :

 

 

An error occurred when deserializing in the simple transformation program /1SAI/TXJE038DFBE1E36238B3600, Byte-Offset in XML: 671 , ST: /1SAI/TXJE038DFBE1E36238B3600, Line:

 

 

(When I test it using SOAPUI it runs ok)

 

I have search a solution but I haven't found any. I only found the next two threads but none of them is answered.

 

 

 

Can anybody help me please. I don't know the cause of this error.

 

Thanks in advance and have a nice day.

Dynamic XSLT source code generation based upon internal table

$
0
0

Hi,

 

Is there anyway to generate dynamic XSLT source code based upon final structure of output internal table and call dynamic generated XSLT in program?

 

CALL TRANSFORMATION z_transformation

            PARAMETERS

             p_shared_string = lo_shared_str_nodeset

            SOURCE XML g_sheet_data

            RESULT lt_data = i_data[].

 

Source code example of XSLT transformation -

 

<xsl:template match="/">

     <asx:abap version="1.0">

       <asx:values>

         <LT_DATA>   "Internal table

           <xsl:for-each select="ss:worksheet/ss:sheetData/ss:row">

             <xsl:if test="position() &gt; 1">

               <item>

                 <FIELD1>

                   <xsl:variable name="cell_id" select="concat('A', position())"/>

                   <xsl:variable name="v_index" select="ss:c[@r=$cell_id][@t='s']/ss:v"/>

                   <xsl:if test="$v_index">

                     <xsl:value-of select="$V_SHARED_STRING/sst/si[$v_index + 1]/t"/>

                   </xsl:if>

                   <xsl:if test="not($v_index)">

                     <xsl:value-of select="ss:c[@r=$cell_id]/ss:v"/>

                   </xsl:if>

                 </FIELD1>

             </item>

             </xsl:if>

           </xsl:for-each>

         </LT_DATA> "internal table

       </asx:values>

     </asx:abap>

   </xsl:template>

</xsl:transform>

practice abap programs

$
0
0

Hi all,

 

Am a SAP ABAP certified fresher(dec 2014). Still searching for a job as a trainee or associate position. Meanwhile I need to have a lot of practical knowledge for which i need a platform where i can implement some scenarios. As of before I was using IDES (provided by consolut) for the same.

Now its not working as of licensing issues.

Kindly let me know a platform where i can practice sap abap scenarios, so that it would help me to get through interviews!

convert time

$
0
0

there is any fm available to convert time like 8.50 (stdaz) into 08:50:00 format

Viewing all 8768 articles
Browse latest View live


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