2013 Dec 09 8:55 AM
Hi Gurus/Experts.
I have a problem with my new report.
This report is about aging and Net Due Date.
Before, I think I must say sorry because I believe this is an easy question for you all. Because I am a new programmer and new abapper please help me. I don't have a teacher anymore.
First, I try to get all the not cleared invoice document from BSIK table, and then I try to get the net due date from function module to internal table.
In my case, I cant move it from function module to internal table, can someone give me a suggestion please ?
2013 Dec 09 11:33 AM
And go to ABAPDOCU, search for function module and look at the example provided by SAP
(also check DWDM for more basic abap examples)
Hi Gurus/Experts.
I have a problem with my new report.
This report is about aging and Net Due Date.
Before, I think I must say sorry because I believe this is an easy question for you all. Because I am a new programmer and new abapper please help me. I don't have a teacher anymore.
First, I try to get all the not cleared invoice document from BSIK table, and then I try to get the net due date from function module to internal table.
In my case, I cant move it from function module to internal table, can someone give me a suggestion please ?
2013 Dec 09 9:02 AM
Hi Ri
For each line which you found in BSIK you will have to find dues date for all items one by one. Once the FM retruns you dues date..fill you work area field and modify the internal table
Nabheet
2013 Dec 09 9:05 AM
2013 Dec 09 9:08 AM
Lets say your are using ABC fm inside loop which return due date for one line item at a time.
Loop IT_BSID.
lv_tabix = sy-tabix.
CALL FM ABC which return value in LV_DUEDATE.
IT_BSID-DUEDATE = lV_duedate
modify it_bsid index lv_tabix transporting duedate
endloop
2013 Dec 09 9:04 AM
Hi Ri
you need define the tables as a parameter in your function module. you can see in SE37, there are many paramters, importing, exporting, tables, exceptions.
this tables parameter can return value to internal table when you call it.
Regards,
Archer
2013 Dec 09 9:06 AM
Hi Dengyong,
thank you for reply
but can you help me with an example ?
please I think I just need it an we will solve this.
2013 Dec 09 9:06 AM
Your question is not clear..
You are creating a function module and you want to return an internal table....
In that case. Create a Table Type in data dictionary and use that as an export parameter.
Regards
2013 Dec 09 9:09 AM
hello Mohammed Yakub,
I am not create it,
I just use the standard function module from SAP.
my question is, how to get the value from function module and move it to internal table,
when I try to move it, it just move 1 value from 1 line. I need all value from all line. how to do it ?
2013 Dec 09 9:55 AM
2013 Dec 09 10:04 AM
2013 Dec 09 10:22 AM
are u trying update the same internal with due date that u have used when u r selecting data from BSIK?
2013 Dec 09 10:07 AM
hi
You just need to pass the value to the FM and FM will return the table with set of values now you need pass this table returned by FM to a internal table, for that you can just modify the internal table or append the internal table,
use below code for reference :
WHILE D1 LE D2.
CALL FUNCTION 'BAPI_AR_ACC_GETOPENITEMS'
EXPORTING
COMPANYCODE = PA_BUKRS
CUSTOMER = PA_KUN
KEYDATE = D1
NOTEDITEMS = 'X'
* SECINDEX = ' '
* IMPORTING
* RETURN =
TABLES
LINEITEMS = LT_ITMES.
ENDWHILE.
LOOP AT LT_ITMES INTO WA_ITMES.
MOVE WA_ITMES-CLEAR_DATE TO WA_BSID-AUGDT.
MOVE WA_ITMES-COMP_CODE TO WA_BSID-BUKRS.
MOVE WA_ITMES-FISC_YEAR TO WA_BSID-GJAHR.
MOVE WA_ITMES-REF_DOC_NO TO WA_BSID-XBLNR.
MOVE WA_ITMES-ALLOC_NMBR TO WA_BSID-ZUONR.
MOVE WA_ITMES-DOC_NO TO WA_BSID-BELNR.
APPEND WA_BSID TO IT_BSID.
ENDIF.
hope it helps.
2013 Dec 09 10:14 AM
2013 Dec 09 10:19 AM
Hi Ri,
When you use the FM to get the due date giving the invoice document to the FM.
Try this out.
First create an internal table say for this case IT1, and assume that you have your Invoice Document in one internal table say as IT
Now try looping the internal table IT which contain the Invoice Document and inside the loop use the function module from which you get due date and after fetching the due date from the FM pass that data to the newly created internal table IT1 and append the internal table IT1.
Hope this will solve your problem
Regards
Rounak
2013 Dec 09 11:28 AM
In your code
CTRL+F6 type in the function module, provide correct importing parameters, use in code.
2013 Dec 09 11:33 AM
And go to ABAPDOCU, search for function module and look at the example provided by SAP
(also check DWDM for more basic abap examples)
2013 Dec 10 4:24 AM
2013 Dec 10 5:02 AM
Hello Ri,
If your problem has been solved. Kindly close the discussion.
Regards,
Chandni Sharma
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |