on 02-23-2011 7:10 AM
Hi,
i need to know to to delete row lines using message mapping function (example function aritmetic). here the scenario
1) The Mapping design is between RFC ( BAPI_ENTRYSHEET_GETDETAIL) and Message Types (MT_BAPI_ENTRYSHEET_GETDETAIL). one of the component is ENTRYSHEET_SERVICES-EXT_LINE.
Heade data:
Sheet_no create_by created on
0010003960 PMADM1 12/11/2006
item lines:
PCKG_NO LINE_NO EXT_LINE
0010022867 0000000001 0000000000
0010022868 0000000002 0000000010
this result as i created message mapping one to one between the RFC and the MT.
BAPI_ENTRYSHEET_GETDETAIL MT_BAPI_ENTRYSHEET_GETDETAIL
Sheet_no -
> Sheet_no
create_by -
> create_by
created on -
> created on
items -
> items
PCKG_NO -
> PCKG_NO
LINE_NO -
> LINE_NO
EXT_LINE -
> EXT_LINE
what i need to done is to deleted the lines if ENTRYSHEET_SERVICES-EXT_LINE = 000000000 or ENTRYSHEET_SERVICES > 0.
i have tried modify using arimetic fuction such as :greater
ITEMS -
>
greater -
> item
EXT_LINE -
>
but still not working. anybody have suggestion ?
hi,
use
ENTRYSHEET_SERVICES-EXT_LINE greater than 000000000
or -
> createIf -> item
ENTRYSHEET_SERVICES greater than 0
in this case you make sure that the top level of your item/entrysheet is created only when one of those conditions is true. you find the create if under the nodes function section in the message mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
what i done is at Response Message Mapping , MT_MT_BAPI_ENTRYSHEET_GETDETAIL. under ITEM, i set as:
EXT_LINE(1st), CONSTANTS(0000000000) as 2nd.
1st ------>
greater ----->createIf ----->ITEM
2nd------>
after i tested internally using test , it look like working when EXT_LINE = 0000000000, the ITEM is not appeared (Header appeared) and if EXT_LINE = 0000000001 (> 0) , the ITEM and header is appeared.
but after i tested downloded WSDL and test using microsoft infopath, the result only return Header only.
**is quite difficult for me to explain in text, easier if picture can be included
hi, i attached message mapping i have done for this scenario:
1) [Message Mapping For Request|http://1.bp.blogspot.com/-mz46rZq8Tq0/TWYWUPQStiI/AAAAAAAABoA/DJg9g2C_M7Q/s1600/01_Req_MM.JPG]
2) [Message Mapping for Header respong|http://1.bp.blogspot.com/-ZWcs1zrXkNk/TWYWWZOH5lI/AAAAAAAABoE/Hza42EuRmco/s1600/02_Respond_header_MM.JPG]
3) [Message Mapping to exclude ITEM if EXT_LINE < 0 |http://2.bp.blogspot.com/-bNbvslMCAJw/TWYWYyjyl7I/AAAAAAAABoI/rv4iRIrEoA4/s1600/03_Respond_ITEM_MM.JPG]
4) [PI Test if EXT_LINE < 0|http://4.bp.blogspot.com/-DzBPMyvHMrc/TWYWZSw27TI/AAAAAAAABoM/uEh4C9iG3z0/s1600/04_PI_TEST_Less0_MM.JPG]
- result show it success to return Header and Return
5) [PI Test if EXT_LINE > 0|http://1.bp.blogspot.com/-Rbh8t39aXHA/TWYWZom1aeI/AAAAAAAABoQ/2izXplU3Zzw/s1600/05_PI_TEST_greater0_MM.JPG]
- result show it success to return Header, ITEMS and Return
6) [Test with Infopath - only return header result|http://2.bp.blogspot.com/-RGk6ju0CRAI/TWYWOXkaA3I/AAAAAAAABn8/fAfvlzqR6As/s1600/06_PI_TEST_infopath.JPG]
- Result only return HEADER only
Edited by: firdaus hashim on Feb 24, 2011 9:36 AM
here the XML file: is this the XML file you required to view.
the Respond XML
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_BAPI_ENTRYSHEET_GETDETAIL_RESP xmlns:ns1="usr:BAPI_ENTRYSHEET_GETDETAIL">
- <ENTRYSHEET_HEADER>
<SHEET_NO>0010003960</SHEET_NO>
<CREATED_BY>PMADM1</CREATED_BY>
<CREATED_ON>2006-12-11</CREATED_ON>
<CH_ON>2011-02-14</CH_ON>
<CHANGED_BY>ERP_PI</CHANGED_BY>
<CURRENCY>MYR</CURRENCY>
<SHORT_TEXT>Work has completed</SHORT_TEXT>
<PO_NUMBER>0020029590</PO_NUMBER>
<PO_ITEM>00010</PO_ITEM>
<SCORE_TIME>2</SCORE_TIME>
<SCORE_QUAL>80</SCORE_QUAL>
<DOC_DATE>2006-08-11</DOC_DATE>
<POST_DATE>2011-01-31</POST_DATE>
<NET_VALUE>5000.0000</NET_VALUE>
</ENTRYSHEET_HEADER>
</ns1:MT_BAPI_ENTRYSHEET_GETDETAIL_RESP>
**Thanks to your effort
Hi,
What I understand from your message is, you dont want to pass a particular item from source file to target if ENTRYSHEET_SERVICES-EXT_LINE = 000000000 for that item. Correct me if I am wrong.
If above statement is correct, then you can use create if function. and in If you give the condition as to check if ENTRYSHEET_SERVICES-EXT_LINE = 000000000.
Regards,
Gouri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.