Function Module which gives complete list of objects that another object to
Hi All,
Is there any standard FM that can give us complete list of objects that another object(Order/Cost Center) settles to??
Thanks in advance,
Prathima
Hi,
Question is not clear.
Revert back,
Regards,
Naveen
Similar Messages
-
Is there any function module which gives open invoices &open amount?
Hello All,
I want to use function module which gives open invoices with open amount.
I know 'CUSTOMER_OPEN_ITEMS' 'BAPI_AR_ACC_GETOPENITEMS' function which gives open invoices but does not give open amount.
Can anyone help me to find such function?From this BAPI ,
BAPI_AR_ACC_GETOPENITEMS, You got amount for items in lc_amount field of lineitems table parameter.
I hope, it will helpful to you.
by
Prasad GVK. -
FM that can give complete list of objects that another object settles to??
Hi All,
We are fetching Order and its corresponding Partner Object from COBRB table.
For all the partner objects,no.of settled objects are fetched.
All this data is fetched by looping at corresponding internal tables.
We want to know if there is any standard FM to fetch the data mentioned in the above scenario.
This is how the flow goes in our program:
In COBRB:
Objnr OR9D0000100089--> settlement receiver object KSPSEG0000001452
CSSL:
CO area : PSEG; Cost center : 1452; Fiscal Year : 2007> 11 entries> Objnr - KLPSEG0000001452T1080
COSS:
Objnr KLPSEG0000001452T1080, Fiscal Year : 2007> 53 entries> Partner Object OR000100394469
COSS:
Objnr OR000100394469, Fiscal Year : 2007 >81 entries> Partner Object PR00288374
COSS:
Objnr PR00288374, Fiscal Year : 2007> 36 entries> Partner Object OR9D0000100089
Thanks in Advance,
PrathimaHi,
Question is not clear.
Revert back,
Regards,
Naveen -
Function module to get month lists for entered date
Hi Experts,
Is there any function module which gives me output as mentioned below.
Eg Input : 01.10.2010 - 01.02.2011
OUTPUT : OCT 2010
NOV 2010
DEC 2010
JAN 2011
FEB 2011
Please suggest.
Regards,
Kaustubh.Moderator message - Please see How to post code in SCN, and some things NOT to do... before posting - post locked
Please do not ask basic date questions
Rob -
Any Function Module which will give user id or position
Hello Friends,
is there any standard function module which will give the attribute position id or user name if i pass the 'attribute id as CNT' with value of the CNT. i know there is a standard function module 'BBP_READ_ATTRIBUTES'. but this FM will give the value of the attribute id if i pass the user id and attribute id but i want user id or position when i pass attribute id and value.
john.Hi,
See this related thread:
Re: Get all users given a specific product category
You cna use the similar approach to find for the attribte cost centre.
BR,
Disha. -
BAPIs or Function Modules for Links between different Business Objects
Hi experts,
I am accessing an SAP CRM 5.0 system from outside via remote function calls.
I have the GUID of a business partner and would like to find other business objects
that are related to this business partner.
For example:
- Which activities are relevant for this business partner?
- Which orders were placed by this business partner?
- Which leads or opportunities are linked to this business partner?
- Which products did this business partner order?
Is it possible to get this information by calling BAPIs or other RFC function modules?
Regards,
KarstenAfter studying lots of documentation and trying to understand the BOL and GenIL concepts,
I finally found a function module which meets my demands. With function module
CRM_GENIL_GET_QUERY_RESULT you can execute a Search Object of the GenIL,
and it is remote-enabled.
By checking transaction GENIL_MODEL_BROWSER and choosing component set "ALL"
you get a list of all defined Search Objects. The Search Object that finds all orders of a
business partner is "BTQuery1O".
DATA gt_parameter_list TYPE crmt_name_value_pair_tab.
DATA gs_parameter_list TYPE crmt_name_value_pair.
DATA gt_data_hdr TYPE TABLE OF crmt_genil_rfc_data_hdr.
DATA gt_data_attr TYPE TABLE OF crmt_genil_rfc_data_attr.
DATA gt_data_rels TYPE TABLE OF crmt_genil_rfc_data_rel.
DATA gt_data_rel_obj TYPE TABLE OF crmt_genil_rfc_data_rel_obj.
gs_parameter_list-name = 'BP_NUMBER'.
gs_parameter_list-value = '4000000011'.
APPEND gs_parameter_list TO gt_parameter_list.
CALL FUNCTION 'CRM_GENIL_GET_QUERY_RESULT'
EXPORTING
iv_query_name = 'BTQuery1O'
it_parameter_list = gt_parameter_list
TABLES
et_data_hdr = gt_data_hdr
et_data_attr = gt_data_attr
et_data_rels = gt_data_rels
et_data_rel_obj = gt_data_rel_obj
EXCEPTIONS
error_occured = 1
OTHERS = 2.
Before you can use the function module, you have to call function module CRM_GENIL_INIT
to initialize the GenIL.
Regards,
Karsten -
Table or function module from for complete physical file path?
Hi All,
I know the Logical file and Logical path name, i can see the complete path also from logical path name i.e. the physical file address through transaction FILE, e.g. /USR/TMP/ , but i want to display this path in one of the report output,
so please help me with the table or the function module which can give me the complete physical file path.
I checked the the table ADMI_FILES but it contains the file name or the Logical path name but the complete physical file address e.g /USR/TMP?, like this is not available. More over i tried function module file_get_name, still the physical address is not correct one, it is giving same address for all logical paths.
Kindly Guide me for this
Regards,
Nikesh Kumartry sth like this:
CALL FUNCTION 'FILE_GET_NAME_AND_LOGICAL_PATH'
EXPORTING
LOGICAL_FILENAME = LDS_NAME
IMPORTING
FILE_NAME = sfile
LOGICAL_PATH = pth
EXCEPTIONS
FILE_NOT_FOUND = 01.
IF SY-SUBRC NE 0.
MESSAGE E300(BD) WITH LDS_NAME. " TODO MG
ENDIF.
SELECT single PATHEXTERN FROM path INTO expth
where pathintern = pth.
replace '<FILENAME>' with space into expth.
concatenate expth '/' sfile into sfile.
open dataset sfile for output in text mode encoding default.
A. -
Functional Module which can send FAX
Hi All,
Can you please suggest a function module which we can use to send fax. We wanted to fax the output list genrated by the program.
Regards,
Vidya.The following program shows you how to send a fax from within ABAP/4. The report is delivered
in the standard system and is used in Transaction SCOM for the function "Send test fax".
Only the method via the call of SAPscript with DEVICE='TELEFAX', described below, ensures the
generation of a correct transmission request, independent of the R/3 release and of the used
fax server solution and its configuration.
The regular printing (for example, with NEW-PAGE PRINT ON...) on an output device created in
the spool administration of the device class 'Telefax' does generally not work!
REPORT RSKSENDF MESSAGE-ID SK.
Test report to send a test fax
sends a fax to the number <TO_CNTRY>-<TO_NMBER>
containing an automatically generated message text.
TABLES: USR03.
PARAMETERS: TO_CNTRY LIKE T005-LAND1 OBLIGATORY,
TO_NMBER LIKE TSP01-RQTELENUM OBLIGATORY,
FROM_USR(30) TYPE C DEFAULT SY-UNAME,
TO_RECIP(30) TYPE C DEFAULT SY-UNAME.
SAPscript content ITAB
DATA: BEGIN OF TEST_DOC OCCURS 10.
INCLUDE STRUCTURE TLINE.
DATA: END OF TEST_DOC.
SAPscript header struct
DATA BEGIN OF HEADER.
INCLUDE STRUCTURE THEAD.
DATA END OF HEADER.
INITIALIZATION.
get county from user addres in usr03
system->user profile->user address
check if not empty
SELECT SINGLE * FROM USR03 WHERE BNAME = SY-UNAME.
IF SY-SUBRC = 0 AND USR03-LAND1 SPACE.
TO_CNTRY = USR03-LAND1.
ENDIF.
START-OF-SELECTION.
PERFORM FILL_UP_TEST_DOC.
PERFORM SHOW_TEST_DOC.
AT PF08.
PERFORM SEND_FAX TABLES TEST_DOC USING TO_CNTRY
TO_NMBER.
AT SELECTION-SCREEN ON TO_NMBER.
PERFORM CHECK_NUMBER USING TO_CNTRY TO_NMBER.
*& Form CHECK_NUMBER
FORM CHECK_NUMBER USING
COUNTRY
NUMBER.
DATA: SERVICE LIKE TSKPA-SERVICE VALUE 'TELEFAX',
LEN LIKE SY-FDPOS.
FIELD-SYMBOLS
windows GUI push the ? from mandatory input instead
of overwriting it
LEN = STRLEN( TO_NMBER ).
IF LEN > 1.
SUBTRACT 1 FROM LEN.
ASSIGN TO_NMBER+LEN(1) TO
IF
= '?'.
= SPACE.
ENDIF.
ENDIF.
official check FM
CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
EXPORTING
COUNTRY = COUNTRY
NUMBER = NUMBER
SERVICE = SERVICE.
on old 21?/22? release you may have to handle the
exception
because the Function uses RAISE instead of
MESSAGE... RAISING....
ENDFORM. " CHECK_NUMBER
*& Form FILL_UP_TEST_DOC
fills test text in itab TEST_DOC *
real life example needs to get real life data *
FORM FILL_UP_TEST_DOC.
DATA: DATUM(12) TYPE C,
UZEIT(10) TYPE C.
SAPscript initialization
of course, you may want to set a few parameter
(FORM,LAYOUT,....)
CALL FUNCTION 'INIT_TEXT'
EXPORTING
ID = 'ST '
LANGUAGE = SY-LANGU
NAME = 'FOO-BAR'
OBJECT = 'TEXT'
IMPORTING
HEADER = HEADER
TABLES
LINES = TEST_DOC
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC 0.
MESSAGE A400 WITH 'INIT_TEXT'.
ENDIF.
PERFORM ADD_EMPTY_LINE.
WRITE: SY-DATUM TO DATUM.
WRITE: SY-UZEIT TO UZEIT.
PERFORM ADD_LINES USING 'This is test Telefax'(001)
DATUM UZEIT.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING 'From: &'(002) FROM_USR SPACE.
PERFORM ADD_LINES USING 'To: &'(003) TO_RECIP SPACE.
PERFORM ADD_LINES USING 'Fax number: & &'(004)
TO_CNTRY TO_NMBER.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING
'This is a test fax send by Report RSKSENDF'(005)
SPACE SPACE.
PERFORM ADD_LINES USING 'on SAP system & '(006)
SY-SYSID SPACE.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING
'the quick brown fox jumps over the lazy dog.'(101)
SPACE SAPCE.
PERFORM ADD_LINES USING
'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'(102)
SPACE SAPCE.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING 'End of test'(007) SPACE
SPACE.
ENDFORM. " FILL_UP_TEST_DOC
*& Form ADD_LINES
printf a line an appends it in test_doc *
--> cformat format.
--> p1 param1
--> p2 param2
FORM ADD_LINES USING CFORMAT P1 P2.
TEST_DOC-TDFORMAT = '/'.
TEST_DOC-TDLINE = CFORMAT.
IF TEST_DOC-TDLINE CA '&'.
REPLACE '&' WITH P1 INTO TEST_DOC-TDLINE.
IF TEST_DOC-TDLINE CA '&'.
REPLACE '&' WITH P2 INTO TEST_DOC-TDLINE.
ENDIF.
ENDIF.
APPEND TEST_DOC.
ENDFORM. " ADD_LINES
*& Form ADD_EMPTY_LINE
appends an empty line to test_doc *
FORM ADD_EMPTY_LINE.
TEST_DOC-TDFORMAT = '/'.
CLEAR TEST_DOC-TDLINE.
APPEND TEST_DOC.
ENDFORM. " ADD_EMPTY_LINE
*& Form SHOW_TEST_DOC
lists the test doc for aproval *
*>>>> this is for fun only because PRINT_TEXT also
offers a preview *
FORM SHOW_TEST_DOC.
FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
WRITE: / 'Test fax would look like this:'(020).
ULINE.
SKIP.
LOOP AT TEST_DOC.
IF TEST_DOC-TDLINE SPACE.
WRITE:/ TEST_DOC-TDLINE.
ELSE.
SKIP.
ENDIF.
ENDLOOP.
SKIP.
ULINE.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE: 'Press PF8 to send it'(021).
ENDFORM. " SHOW_TEST_DOC
*& Form SEND_FAX
send fax by calling SAPscript *
Note: Instead of using PRINT_TEXT you may also *
call OPEN_FORM / WRITE_FORM_LINES / CLOSE_FORM, *
this allows you to use a similar program structure *
as with NEW-PAGE PRINT ON / WRITE / NEW-PAGE PRINT
OFF *
FORM SEND_FAX
TABLES DOC2FAX STRUCTURE TEST_DOC
USING COUNTRY
NUMBER.
DATA: SID(5) TYPE N.
DATA BEGIN OF POPT.
INCLUDE STRUCTURE ITCPO.
DATA END OF POPT.
DATA BEGIN OF PRES.
INCLUDE STRUCTURE ITCPP.
DATA END OF PRES.
CLEAR POPT.
POPT-TDCOPIES = 1. " one copy
POPT-TDDEST = " done internaly by script,
POPT-TDPRINTER = " do not fill !!!
POPT-TDNEWID = 'X'. " do not reuse old spool request
POPT-TDDATASET = 'TEST'(022). " fill as you want
POPT-TDSUFFIX1 = 'FAX'(023). " fill as you want
POPT-TDSUFFIX2 = SY-UNAME. " fill as you want
POPT-TDIMMED = 'X'. " send now
POPT-TDLIFETIME = 8. " keep 8 days in spool
POPT-TDTELENUM = NUMBER. " number without country code
POPT-TDTELELAND = COUNTRY. " country of recipient
POPT-TDCOVER = 'test fax'(024).
POPT-TDCOVTITLE = 'test fax'(024).
POPT-TDIEXIT = 'X'.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'TELEFAX' "<<< here we say: fax it !
DIALOG = 'X'
HEADER = HEADER
OPTIONS = POPT
IMPORTING
RESULT = PRES
TABLES
LINES = DOC2FAX
EXCEPTIONS
OTHERS = 01.
do not bother with exception in sample code
CANCELED = 01
DEVICE = 02
FORM = 03
OPTIONS = 04
UNCLOSED = 05
UNKNOWN = 06
FORMAT = 07
TEXTFORMAT = 08
EXTERNAL = 09.
IF SY-SUBRC = 0.
arriving here means we could send:
SID = PRES-TDSPOOLID.
IF SID > '00000'.
MESSAGE S433 WITH SID.
ENDIF.
LEAVE .
ELSE.
do not bother with exception in sample code
MESSAGE A400 WITH 'PRIN_TEXT'.
ENDIF.
ENDFORM. " SEND_FAX
Regards. -
Function Module which will take Wekk No & Return date range (from & To dat)
Hello everyone,
I need a Function Module which will take Week No as an input Parameter & return me the date range
(From date & To date of that week) .
Thanks in advance!
Cheers!
Moderator message: date calculation questions = FAQ, please search before posting.
Edited by: Thomas Zloch on Nov 2, 2010 5:25 PMHi,
Please write the below logic..
data : v_date11 type sy-datum,
monday type sy-datum,
sunday type sy-datum,
v_count1 type i .
*v_count1 = 20 * 7. " Say U want details for 20th week , or give a parameter for week and multiply with 7*
v_date11 = '20100101'. " take the starting day of the year ....
v_date11 = v_date11 + v_count1. " add to the date
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE' <-- call this FM
EXPORTING
DATE = v_date11
IMPORTING
WEEK = WEEK
MONDAY = MONDAY <-- will have the week starting day
SUNDAY = SUNDAY
Regards,
Srini. -
Datasources with function module which uses table type
hi..
I am creating a datasource which extracts data using a function module from xRPM to BW. When creating the function module it gives an error " TABLES parameters are obsolete!" while trying to specify the extract structure. I searched in SDN and learnt that we need to use table types and use that in the changing tab.Not sure how that works and where we need to use the extract structure for this.
Could someone please explain this to me and let me know how i can create my datasource using this type of function module.Hi,
in your case you need the tables parameter, as the service api expects the result of the fm in a table called e_t_data. Of course table parameters are obsolet but you can just ignore the warning and it will work.
regards
Siggi
PS: Extraction fm must follow a strict interface definition.
Message was edited by:
Siegfried Szameitat -
What is the function module which is used to trigger email
Hi ALL,
can u send me the function module which has to trigger email when sales order was saved.
kindly send me the inputs
thanks & regards
naveen
Moderator Message: Basic Question. Thread locked.
Edited by: kishan P on Nov 11, 2010 10:56 AMHi,
This needs to coded in the Save User Exit of the Sales Order Include MV45AFZZ (USEREXIT_SAVE_DOCUMENT) and use the Function Module "SO_DOCUMENT_SEND_API1" to trigger a mail.
Please try this and let me know if any.
Regards,
Srinivas
Moderator Message: Do not answer Basic Question.
Edited by: kishan P on Nov 11, 2010 10:58 AM -
Need of a function module to give a pop up of certain values
Hi Experts,
I am need of an function module to give a pop up of values present in an internal table, just like an F4 help. Please advise.
Thanks in advance,
Vivenchandar Rhi Viven,
check the program <b>BALV_POPUP_TO_SELECT</b> to see how the function module <b>REUSE_ALV_POPUP_TO_SELECT</b> can be used for your requirement.
Hope this helps,
Sajan Joseph. -
Is there a BAPI function module which reverses the sign of an integer
Hi Friends,
Could u plz tell me a BAPI function module which can reverse the
sign of an integer ?
For example:
if i get the integer value in work area as <number> <sign> , i need to change it to <sign><number>.
i.e if i get the integer value in work area as "248-" ("-" indicates minus sign) to " -248 ".
i.e if i get the sign after the value , my requirement is to get the sign before the value.
The actual ABAP query is:
data: QTY_1 TYPE CHAR10,
QTY_2 TYPE CHAR10,
WA_DISTK_PORTLET-QUANTITY TYPE INT4.
QTY_1 = WA_DISTK_PORTLET-QUANTITY.
SEARCH QTY_1 FOR '-'.
IF SY-SUBRC = 0 AND SY-FDPOS <> 0.
SPLIT QTY_1 AT '-' INTO QTY_1 QTY_2.
CONDENSE QTY_1.
CONCATENATE '-' QTY_1 INTO QTY_1.
CONDENSE QTY_1.
ELSE.
CONDENSE QTY_1.
ENDIF.
CLEAR: WA_DISTK_PORTLET-QUANTITY.
MOVE : QTY_1 TO WA_DISTK_PORTLET-QUANTITY.
when i move this QTY_1 to work area quantity field The sign is coming after the numeric value.
Note: There is no possibility to change the datatype of quantity field.
I have tried my level best with 'CLOI_PUT_SIGN_IN_FRONT' function module.
I will assign full points to the correct function module.Hi Ram,
try this ang look into fields.
data: fields type table of SVAL with header line.
fields-tabname = 'MARA'. fields-fieldname = 'MATNR'. append fields.
fields-tabname = 'BKPF'. fields-fieldname = 'BUDAT'. append fields.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
POPUP_TITLE = 'Value Insert'
TABLES
FIELDS = fields.
Regards, Dieter -
Is there any function module for getting distribution list name
Hi all,
Is there any function module for getting distribution list name when there is same description for two distribution list name.
or
help me how to fetch the correct distribution name when there is same description.
In order to send mails.
Tell me ASAP.
thanks
sagar.http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
list of Fms -
Is there any function module to give absolute value of a number?
Hi,
Is there any function module to give absolute value of a number?
That has similar functionality to the Built in Function ABS.
Please let me know.
Thanks,
cshi,
why are you looking for any function module.
You can easily get it by mathematical function ABS .
Syntax : <Turget Variable> = ABS <Source Variable>
\[removed by moderator\]
Anirban Bhattacharjee
Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM
Maybe you are looking for
-
How do I back up contacts in my phone
Hi, Everytime I try to back up contacts from my iphone or ipad it asks me if I want to merge with 142 other contacts and modify several others that are not actually in my current contact list. I removed all the contacts from the windows file and manu
-
Alright, I am stumped. I have looked at nearly every article on this error here at Technet and other sites: An error occurred while sending encryption status data. Error code: 0x803d0013 Details: A message containing a fault was received from the re
-
Getting an error while importing Development Configuration file (NW 2.0)
i, while importing a development configuration file for Webdynpro ( SAP NW 2.0 ), i am getting an error "Getting Input Stream Failed-> Unable to find the host ..." But i can ping to the server and tr is also working . i could see Active and I
-
I need help I updated my phone and when It was done updating if centime was missing and when I ask Siri to upend it she says I have to make an account how do I do this if i don't have the app plz help me apple
-
I'm opening CJ20N in an iView and the right-click contextual menu is not showing up, but does when in SAP GUI. Any help?