Quantcast
Channel: SCN: Message List
Viewing all 8902 articles
Browse latest View live

How can a parent class access public and protected methods/variables of child class?

0
0

We can access the public, protected and private members of parent class in sub classes/child class. But public class can access the protected and public members of child class as well. How to achieve this?

 

 

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

*& Report  ZSR_TEST

*&

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

*&

*&

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

 

 

REPORT  zsr_test.

 

 

*----------------------------------------------------------------------*

*       CLASS parent DEFINITION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS child DEFINITION DEFERRED.

*----------------------------------------------------------------------*

*       CLASS parent DEFINITION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS parent DEFINITION FRIENDS child.

 

 

   PUBLIC SECTION.

     DATA: v_pub TYPE char40 VALUE 'Public variable in Parent class'.

     METHODS: m_parent.

 

 

   PROTECTED SECTION.

     DATA: v_pro TYPE char40 VALUE 'Protected variable in Parent class'.

 

 

   PRIVATE SECTION.

     DATA: v_pri TYPE char40 VALUE 'Private variable in Parent class'.

 

 

ENDCLASS.                    "parent DEFINITION

 

 

*----------------------------------------------------------------------*

*       CLASS parent IMPLEMENTATION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS parent IMPLEMENTATION.

 

 

   METHOD m_parent.

     WRITE: / 'Method - M_PARENT :-',

            / 'Parent Class Attributes are as follows: ',

            / '=======================================',

            / v_pub,

            / v_pro,

            / v_pri.

     SKIP 2.

    

*     CALL METHOD m_child.

   ENDMETHOD.                    "m_parent

 

 

ENDCLASS.                    "parent IMPLEMENTATION

 

 

*----------------------------------------------------------------------*

*       CLASS child DEFINITION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS child DEFINITION INHERITING FROM parent.

 

 

   PUBLIC SECTION.

     METHODS m_child.

     DATA: c_pub TYPE char40 VALUE 'Hello'.

 

 

 

 

   PROTECTED SECTION.

   PRIVATE SECTION.

 

 

ENDCLASS.                    "child DEFINITION

 

 

*----------------------------------------------------------------------*

*       CLASS child IMPLEMENTATION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS child IMPLEMENTATION.

 

 

 

 

 

 

   METHOD m_child.

 

 

     DATA oref TYPE REF TO parent.

     CREATE OBJECT oref.

     WRITE  oref->v_pri.

 

 

     WRITE: / 'Method - M_CHILD :-',

            / 'Child class can access all Public attributes from Parent',

            / '========================================================',

            / v_pub,

            / v_pro.

     "/ v_pri. Private data can't be accessed from Child

     SKIP.

 

 

     v_pub = 'Public has been changed in Child class'.

     v_pro = 'Protected has been changed in Child class'.

 

 

     WRITE: / 'Changed Public & Protected attributes:',

           / '======================================',

           / v_pub,

           / v_pro.

*           / v_pri.

 

 

   ENDMETHOD.                    "m_child

 

 

ENDCLASS.                    "child IMPLEMENTATION

 

 

START-OF-SELECTION.

   DATA: o_parent TYPE REF TO parent,

         o_child TYPE REF TO child.

 

 

   CREATE OBJECT: o_parent, o_child.

 

 

   CALL METHOD: o_parent->m_parent,

               o_child->m_child.

 

 

   o_parent->v_pub = 'Public data is changed again by Sandip.'.

 

 

   SKIP 2.

   WRITE: / 'Public data can be changed outside the Class:',

          / '=============================================',

          / o_parent->v_pub.

 

Regards,

Gopa


Re: Interface Determination "Not Equal" Condition is not working

0
0

Hi,

 

/p1:MTPODSalesLSUK/Record_Set/Data/MTD_Quantity[not(starts-with(.,"0"))] EX

/p1:MTPODSalesLSUK/Record_Set/Data/MTD_Quantity ≠ '0'

/p1:MTPODSalesLSUK/Record_Set/Data/MTD_Quantity ≠ "0"

Don't use apostrophes or double quotes when using NE or EQ. Just use 0 and it should work.

 

Regards,

Mark

Re: Mass maintenance of Risk ID and Rule ID for a Mitigation control ID

Re: How to display result row of a compounded characteristic in Bex

Re: Uploading Key figures from ECC

0
0

Hi Jitendra,

 

If I can speculate, I would say use ABAP to fetch data from ECC and load data in S&OP HANA DB through jdbc connection.

 

Read this - ABAP and SAP HANA | SAP HANA

 

Hope this helps.

 

Regards,

Aditya G

Cannot determine a target system for migration, check sld connection

0
0

Hi Experts,

 

While using the Migration Tool the target system is not getting populated. Encountering error "Cannot determine a target system for migration, check sld connection" any ideas?

 

The destinations maintained for SLD is pinging successfully. Appreciate your help!

 

 

Thanks & Best Regards,

Anand Patil

Re: SAP implementation of Chile e-Invoicing law (20.727)

0
0

The below table will give you an idea about the deadline for your organization for Chile eDocument implementation -

 

EnterpriseLast year's
revenue (in UF*)
Last year's
revenue (in USD)
LocationMonths (from
Feb, 2014)
Deadline to implement
Chile eDocument
SmallBelow 2400Below 100 KUrban241st Feb, 2016
Rural361st Feb, 2017
MediumBetween 2400
and 100,000
100 K - 4.2 MUrban181st August, 2015
Rural241st Feb, 2016
LargeAbove 100,000Above 4.2 MAll91st Nov, 2014
*UF = Unidad de Fomento
1UF41.56USDas of 23rd Oct, 2014
2400UF99744USD
100,000UF4156000USD

Can I Trigger an Alert in Alert Configuration other than Report RSALERTTEST ?

0
0

Hi,

 

There has been an issue in alert configuration where i cannot populate container variables/elements used in short & long text tab into the email

For this

 

I checked with alert configuration guide where all the steps /measures were followed/taken exactly as the same way mentioned in the guide

I trigger alert using report RSALERTTEST but i can't get container variables filled, let's say RSALERTTEST is only for testing whether we are able trigger an alert /not ? because Gaurav Ranjan in scn,sap.com posted that container variables are not filled and are sent empty when we trigger alerts using RSALERTTEST.

Are there any alernatives to trigger an alert as well as get the container variables filled/populated?

Are there any places to look for where discussion will have right justification?

 

I want to test my alert and i want container variables used in short & long text tab to be get populated can any 1 help me out

 

Please refer for more piece of info to get clarity on question:

Misbehavior of Alerts in Alert Configuration in SAP 7.1

How does Container Variables Gets Populated in an Alert Configuration

Problem with Container Elements/Variables Used in Container Tab in ALRTCATDEF


Contract data not getting copied for service ticket follow up complaint.

0
0

Hi Experts,

We are creating a complaint as a follow-up document to service ticket . But the contract data is not getting copied.

We contacted SAP and they told us that its a standard behavior .The reply is basically an SAP note

841830 - Contract data not copied to follow-up transaction

 

My question is is there a way to change this behavior using CRM_COPY_BADI ?

I tried to look for the method which I can implement to get the contract data in items, But I was not able get it .

 

Please suggest the way to get it working

 

Thanks in advance .

Naval

Re: I have a requirement to auto populate the cost center in ME51N when the user enters the Requisition ID. I could not find any relevant BAdis for this. Can anyone please help?

0
0

Many thanks for the solution Joseph. I was able to retrieve the cost center value. Appreciate all your help and support.

 

Cheers,

Harmi

Re: Steps to connect to OData Services from Netweaver Gateway in SMP3

0
0

Dear Bjoern,

 

Thanks for your reply.

I am able to test the connection and it says the connection is successful.

But in step 9 when i am trying to search the service, it is not able to search coz i think the service is deployed under opu-->odata-->sap node rather than the iwbep node in the gateway server.

 

The SMP version that i am using is SP04

 

Can you advice what could be the reason for it.

 

 

Thanks,

Best Regards,

Rakshit Doshi

Re: Why dont the settlement KO88 of production order reverse the WIP data of the last month

0
0

I also agree with Choi...However you can check your order status. It should not be TECO/DLV.

Re: My Info -> Employee Profile

0
0

Hi,

 

I am trying to implement HR renewal 2.0 - Initial Shipment. I have already referred this link and the admin guide in SAP Market Place.Still facing issue. Is there any other step that i have  missed?

 

 

Regards,

Navya.

Re: Make to Order

To build a report on Questionaire response in SAP E Rec

0
0

Hi Experts,

 

In SAP E Recruitment we want to build a report to analyze Questionnaire response. The problem is that response to Questionnaires are not in some table & I am not familiar on how to get them using PHAP_Admin in bulk against a requisition.

 

Please help as we are taking candidates preference for test center for online exam & we need to book centers according to response to questionnaire.

 

Regards

Puneet


Re: How to create 10 InfoCube from DSO

0
0

No our administrator not support any type of partitioning.

Re: Distribution formula

0
0

In BAdI implementation method IF_EX_RECD_DIST_RULE~GET_VALUES there is table parameter CT_DIST_VALUES. You can put there as many as you want lines, but remember that valid periods all of them have to be between ID_ABS_FROM and ID_ABS_TO.

Also check in view V_TIVCDCALCE if the calculation formula used on you condition has empty External Distribution.

 

Regards,

Jakub.

BPC 10.0 - Invoking work status window thru VBA button/link in excel sheet

0
0

Dear All,

 

In BPC 10.0 NW, how can I invoke work status interface(where we set/change WS)  through VBA button/link in an excel sheet?

 

i.e. invoking the window where we set the work status settings?

 

I believe whatever we do thru the EPM tab menus can be invoked from the button via VBA script.

 

Thanks.

 

Regards,

Peri

Re: SAPCRYPTO upgrade

0
0

thank u a sk ur post also helps to me

 

regards,

akondi

Re: Introducing new TOMCAT to the existing SAP BO 3.1

0
0

Hi Shashi,

 

You have 2 options:

 

A. Install tomcat separately:

 

- This approach would involve first checking PAM to first find out which tomcat version is supported. Also checking which JDK is supported with tomcat and making sure your Linux server has it.

- Once you decided which version, then download that from Apache's site.

- Usually its a package which you have to extract on your server and unarchive. Configure it's startup service.

- Add business object libraries location in java options. (Refer to java tab on your windows tomcat.)

- Use wdeploy utility to prepare and deploy war files.

 

B. Modify the existing installation using AddRemoveProduct.sh / modify or remove product script.(situated one folder above bobje) Select Tomcat and that's it.

- Everything automatically done for you.

 

In my opinion option B is better since it will help you in easy maintenance throughout the life cycle.

 

Hope that helps!!!

 

Regards,

Sarvjot Singh

Viewing all 8902 articles
Browse latest View live




Latest Images