OO concept not clear

TYPES: BEGIN OF TY_EXCEL,
MATNR TYPE EKPO-MATNR,
WERKS TYPE EKPO-WERKS,
NETPR TYPE EKPO-NETPR,
EBELN TYPE EKPO-EBELN,
EBELP TYPE EKPO-EBELP,
RATE TYPE EKPO-NETPR,
END OF TY_EXCEL.
DATA: ALV_DATA TYPE STANDARD TABLE OF TY_EXCEL WITH HEADER LINE.
DATA: T_EXCEL TYPE STANDARD TABLE OF TY_EXCEL WITH HEADER LINE.
CLASS ARTICLEMAIN DEFINITION.
PUBLIC SECTION.
METHODS:
FETCHARTICLEZ EXPORTING O_EXCEL LIKE T_EXCEL,
PRINTALV IMPORTING ALV_DATA LIKE T_EXCEL.
ENDCLASS.
CLASS ARTICLEMAIN IMPLEMENTATION.
METHOD FETCHARTICLEZ.
PERFORM POPULATE_ITABFROMEXCEL.
ENDMETHOD.
METHOD PRINTALV.
PERFORM PRINTING.
ENDMETHOD.
CALL METHOD OB->printalv( exporting alv_data = t_excel ).
10 loop at alv_data.
endloop.
In this given code,it compiles ok.
My issue is in line 10.If i compile now ,i get error that alv_data doesnot exist.If incase i define alv_data of same structure as t_excel,i do not get data from t_excel.
What is the use of alv_data then.
I am new to OO ,so plz i may be missing some concepts.
Edited by: aditya  sharma on Jul 22, 2010 8:26 AM

This is because, as noticed by Anup, you should not type parameters of method as table with header line. I would also suggest to copy the typing definition to the class itself because otherwise your are violating OO encapsulation
"here you are refering T_EXCEL which is defined OUTSIDE class
FETCHARTICLEZ EXPORTING O_EXCEL LIKE T_EXCEL, 
So you would need
CLASS ARTICLEMAIN DEFINITION.
PUBLIC SECTION.
"definition INSIDE class
TYPES: BEGIN OF TY_EXCEL,
MATNR TYPE EKPO-MATNR,
WERKS TYPE EKPO-WERKS,
NETPR TYPE EKPO-NETPR,
EBELN TYPE EKPO-EBELN,
EBELP TYPE EKPO-EBELP,
RATE TYPE EKPO-NETPR,
END OF TY_EXCEL.
types: tt_excel type table of ty_excel.
class-METHODS:
"now you can type using class type
FETCHARTICLEZ EXPORTING O_EXCEL type tt_excel, 
PRINTALV IMPORTING ALV_DATA type tt_excel.
ENDCLASS.
And your method call should then look like
"pass only table body, not the header
CALL METHOD OB->printalv( exporting alv_data = t_excel[] ).
Regards
Marcin

Similar Messages

  • R/3-- XI,   queue stuck problem,  concept not clear

    Hi Forum,
    I have a R/3(abap proxy)----->XI scenario,
    now the data being sent from R/3 to XI is getting stuck (due to some HTTP error) in the queue, which is visibale through tcode SMq2 of R/3,
    I want to know, why the stuck queue and hence the LUW is seen through SMQ2 (inbound queue), and not SMQ1 (outbound ) queue,
    though i m under an impression that outgoing messages uses outbound queues,
    pls clarify this concept

    Go to SMGW -> Go to -> Logged on Clients, check your Program ID is registered there or not ?
    Did you follow Michal's blog
    /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    Bean not found error is due to incorrect configuration of RFC Dest, but per your initial message it does not look like, but worth following Michal's blog.

  • Diff... between  ALE, IDOC, RFC, BAPI, BADI --- Not clear and clarify

    Hi All
        I am learning XI and the difference between " ALE, IDOC, RFC, BAPI, BADI "
        Not clear and when to use what and how in point of XI ?
       Pl..clarify me
    Adv..thanks and points
    --- Rakesh Behera

    Hi
    This will expalin you every thing ...pl..go through
    The interface concept of the classic R/3 is based on two different strategies: Remote Function Calls (RFC) and data exchange through IDoc message documents. RFC makes direct and synchronous calls of a program in the remote system. If the caller is an external program it will call an RFC-enabled function in R/3 and if the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.
    I hope this will help you to understand the difference bet..those
    regards
    --- prasad

  • FDM export to HFM - 2nd export did not clear all data from 1st export?

    Has anyone experienced exporting a replacement FDM file to HFM where the 2nd file did not contain an account that was present in the original file and that account/value in the 1st file then remained in the HFM trial balance and caused it to be out of balance? Does the replace export option not clear all the prior file data? The only unusual part of it might be that the problem account was derived using logic group script? Thanks.

    Thanks Hensen - Sure, it was easy enough to fix once I deduced what the problem was - although my solution was just to use the data clear function and reload. The real question is how to prevent it from happening again and it sounds like I can't do much about it - other than trying to train the users to watch out for do-over files that have fewer accounts than the original load?? Am I wrong to think that HFM should try to fully clear all previous data from a load file if there is a replacement or at least try to validate whether or not all prior accounts have been repopulated?? There's plenty of good validation in the validation step of FDM. Why not during the export step? If this makes sense, I'll put in another "enhancement request" to support.

  • We can not clear all recents(30 recents call).  When Tango show "No recents call". We touch other buttons and come back to Recents button again.  It still show 30 recents call.

    We can not clear all recents(30 recents call).  When Tango show "No recents call". We touch other buttons and come back to Recents button again.  It still show 30 recents call.

    No one here is going to do anything about it. Send feedback to Apple.
    http://www.apple.com/feedback/ipad.html
    Basic troubleshooting steps. 
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 

  • Payment not  clearing for Vendor through Automatic Payment Program

    Hi
    I had setup automatic payment program for my vendor to take $ from my GL account. When I run the payment program, it ran without any error, however, the vendor account was not cleared. The balance in GL and Vendor account remains the original amounts.
    The log shows the following.
    Job started
    Step 001 started ( program SAPF110S, variant &0000000001081, user ID XXXXXXX)
    Log for payment run for payment on 01/12/2008, identification XXXX
    End of log
    Job finished
    Can anyone help ?
    Thanks
    Shalini

    I have not proposed a solution. Now go to F110 and go to the table additional tab and press proposal log button on the lower right hand side. this will give a detailed log. Either analyse this error set right error or send the error log for analysis.
    First run the proposal run and if it is successful, run the payment run and then to print run.
    It should be run in the above sequence.
    Edited by: Sivakumar Gopalakrishnan on Jan 12, 2008 7:54 PM

  • System not clearing the Payment request items with the payments

    HI Everybody,
    User getting an issue relating to clearing of the payment request items. In a particular Contract account, it has got 51.75 Pounds of Bank Giro incoming payment. It has contains some 5 items of payment, 3 items of 10.75 and 1 Item of 21.70. The 3 items of 10.75 were cleared 3 payment reqquest items and since there is no due payment requests were there at that time, this 21.70 was showing pending credit item. After two days  two payment requests came as due. There are jobs which run daily for FPMA. But this 21.70 is not clearing to this due payemnt requests. I tried to run this FPMA manually for this contract account. But these were not cleared.
    Could anybody suggest anything on this why these items were not clearing against each other?
    Thanks & Regards
    Siva

    Hi
    The issue is due to the implementation of support packs. Specifically to do with note 1005708.
    siva

  • LM13: Verification field not cleared after [Enter] key

    Hi Experts,
    I'm facing the issue as stated in the OSS note 916654 - LM13: Verification field not cleared after [Enter] key. My current system is ECC, that is why the OSS is already applied to the ECC version. But the problem is, i still faced the problem stated in the OSS.
    Symptom
    In customizing:
    - You have defined [ENTER] in destination screen 302 to SAVE items.
    - You want to verify the destination bin information.
    You use 'Confirm Transfer Order Clustered' RF transaction LM13.
    You scan several SUs and press enter.
    You press [F4-Next pushbutton] to confirm the associated TO(s).
    In the destination screen 302, you scan the verification value for the first item and press [ENTER] key.
    ==> The item is confirmed correctly but when the system proposes the next item, the verification value of the first item is displayed.
    Anyone know how to fix this issue? Pls help.
    thanks
    Hooi Fung

    Hi,
    For example itab-matnr is your screen field
    in PAI
      field: itab-matnr,
             module check_matnr_0700.
    module check_matnr_0700 input.
      move itab_matnr to v_matnr.
    endmodule.
    in PBO.
    move v_matnr to itab-matnr.

  • APP Open Item Not cleared

    Hi All,
    I have strange issue. automatic payment run is executed and after that i have messgae
    Posting orders: 23 generated, 22 completed
    i have 23 clearing document but one document which is generated its not cleared the open item and even am not finding that
    document no in FB03 t code.
    can you give give me your overview on this issue
    "Posting orders: 23 generated, 22 completed" : Why this type of messgage genarated and what will be the reason
    Thank you

    With reference to the issue reported, as you have noticed the number of generated documents and the number of completed documents are different
    ->  "Posting orders: 23 generated, 22 completed". This is a clear indicator that there was something wrong with the update process and the payment document did not get posted. The reason why you have more documents generated than completed maybe due to update terminations on the executing the payment run. It means one of document was not posted
    in the database. You could find the terminated update using SM13. Here you can find an update termination found via sm13 when user processed the payment.
    Also please review the attached note 86578, especially the third recommendation and payment run processing option number 1. Comparison of 'Completed' orders to 'Generated' orders as stated will result in
    identification of incomplete posting problems. Also check this note 70085 which has very good information:
    If you have such terminations in future and documents were not posted, then please try the following
       F110 menupath: Edit   > Payments   > After termination   >
                      Draw up again.
    Else the correction to be taken is to recreate manually the missing document and update the relevant cleared line items with the
    payment document as the clearing document:
    1.Use report RFVBER00 to find document gaps:
    2.Pay the invoices manually.
    You should be able to avoid double payment by using the below option in the print program i.e.
    You should always select the flag "Payment doc.validation" on running your RFFO* report.
    It gives an option to check if the payment documents are already in the system or not, and if it's not the print program excludes this data for payment.
    Hope this information helps.
    Best Regards
    Soumya

  • Customer open item not cleared

    Hi experts
    For a customer open item,when deposited cheque in bank trough t code ff68
    the line item remains as open but not cleared.
    thanks in advance

    Hello,
    After the end of the process you should check the results in order to identify if the account informations were found in order to clear the item.
    Regards,
    REnan

  • Accounting document not clearing even after payment posting.

    In document flow of may cash sale process showing the accounting document 123-- Not cleared.
    After payment receipts in FBCJ and posted & saved, eventhough the accounting data not clearing, but in FBL5N the report is updating, what can be the step i am missing to update the document flow TOP to BOTTOM cleared.
    Waiting for your replies
    Thanking you,
    Veera

    Dear,
    Kindly use the transaction F-32  (Clear Customer).  Select both Uncleared items or document numbers.
    Regards
    Ramesh

  • Rerturns (RE) order Accounting document not cleared

    When you do a cash sale (BV) the accounting document that is generated by the billing document is cleared automatically, but when you do a return on the same item, the accounting doculent is not cleared automatically. What do i have to do, and how will i do it, to clear the accounting document that is generated by the billing document for a return (RE) order.

    Hi,
    you can clear this document against original invoice by FB05,then it will show status as clear
    Kapil

  • Accounting Document not Cleared using BAPI_ACC_DOCUMENT_POST

    Dear Experts,
    I am Using BAPI_ACC_DOCUMENT_POST to post the GL'S , Accounting document is getting created successfully . My Doubt is whether this bapi will clear the Accounting document automatically or we have to use any other function module to clear the Document?
    Please let me know how to clear the document.
    Thanks & Regards,
    Hemant Gulati(A1)

    Documents are not cleared; their line items are.
    Rob

  • Billing document not cleared when processing Payment cards in Sales order

    Hi,
    I am having an issue with Payment card processing (credit card). We are using SAP R/3 4.7. When I use manual authorization, the status of billing document still shows "A" incomplete. The status shows authorization successful but not settled in billing document.The accounting document when billed shows not cleared.We are not using any interface for credit processing. The authorization check is done outside of the system manually. We are planning to use manual authorization for all such transactions. I am not sure if any specific config is to be done or am I misssing something.
    Any inputs in this regard would highly be appreciated.
    Thanks!
    Sanjay

    Hello Sanjay,
    Please also check to see if the field VBAP-ABFOR is filled for the line item (This is the Form of payment guarantee). Without this field filled the billing does not know that the item will be covered by payment cards.
    VBAP-ABGES (Guaranteed (factor between 0 and 1)) should also be filled with 1.
    I hope this helps.
    Best regards,
    Ian Kehoe

  • My question is How to do old 4S to new 5 S to save same into phone but can not do ask someone last night and did not help me as I am deaf and not clear and Please man told me download from computer and I am not understand at all

    Yesterday We went to At and T store and they told me to download from old phone to new phone and I am really upset and I got Icloud and prove but part of still in 4S and has not go in 5S and that is biggest problem and no commuication that woman stay follow what she said but still not working so I do not know what else to do my do not understand and I would like to have someone do for us and AT and T store can not do that part so Told me Apple store and I called last night talk to some one on Apple store but told me that no go back to AT and T store so now total confuse and I am not get anywhere so and why they will not do it so therefore I do not think computer that not clear for us because we have no experince in computer program for this so both are deaf and not clear so over 50 years age and so we need face someone to do for us and told us do our self which is total upset us more so because my twins are in Orlando and can not call them because of problem contiunes in heart so I need someone who we can trust and help us. I do have IPAD mini and almost lost my calls to my twins and today I think get back but not 100 % so I am kind upset and who email us or I will have to go Apple Store and see if they know personal.

    Open this support document http://support.apple.com/kb/HT2109 print it from the computer and follow the steps there. You need to backup your data from the first device and then restore that to the new device.

Maybe you are looking for