856 EDI mapping for G_SHL Segment

Hi Guys,
  I have a question regarding the G_SHL segement mapping in DELVRY01.-- EDI856 scenario.
   I have this mapping for other customer now i need to implement the same for new customer.
In that mapping they created 3 duplicalte G_SHL .
For 3rd G_SHL they created a UDF for generating ITEMS, PACKS, and their count by taking the inputs as E1EDL24 and TDLINE.
what is the need of these two inputs.
Regards,
Sandeep

I think TDLINE is just a free field to fill data as description and stuff like that, on the other hand the EDL24 contains all the position data and packing data
for example, if you have 2 positions in the delivery and they're packed in two packs, you would have 4 EDL24, the 2 positions and the 2 positions within the packs  (maybe some reference to how the  pack is done?)  : (00001), (00002), (90001), (90002)
I think that's easier than to check for EDL37 and the sub EDL44 (Pack and Item segments)
but since the TDLINE can be used in many ways as reference you should probably check the logic and any document for that development
By the way, i was currently requesting in one of my questions how to create a UDF for the Pack, items structure, could you provide more info about that? thanks!

Similar Messages

  • Edi mapping for 856

    Hi,
      can any one please map the below listed fields for edi 856..
           Hierarchical Level
    1)Hierarchical ID Number:
    2)Hierarchical Parent ID Number:
    3)Hierarchical Level Code:
    4)Hierarchical Child Code:

    I think TDLINE is just a free field to fill data as description and stuff like that, on the other hand the EDL24 contains all the position data and packing data
    for example, if you have 2 positions in the delivery and they're packed in two packs, you would have 4 EDL24, the 2 positions and the 2 positions within the packs  (maybe some reference to how the  pack is done?)  : (00001), (00002), (90001), (90002)
    I think that's easier than to check for EDL37 and the sub EDL44 (Pack and Item segments)
    but since the TDLINE can be used in many ways as reference you should probably check the logic and any document for that development
    By the way, i was currently requesting in one of my questions how to create a UDF for the Pack, items structure, could you provide more info about that? thanks!

  • EDI mapping for Shipment notice - SHPMNT05 to 940

    Hi,
    I had to map the SHPMNT05 IDOC to an EDI 940 structure. Was wondering if this is the right way to go for Shipment notices to Warehouses and if someone had a template for this particular mapping.
    Thanks,
    Karun.

    Hi,
    You can try this by making use of preceding-sibling and following-sibling axes in XSLT..after S, u can put a
    <xsl:if test following-sibling::ns0:ReadDataFromOutput[ns0:segment='O']> and try same with rest of the segement.

  • New line for each segment for Inhouse files using bic mapping..!!

    Hi ,
    Idoc to File scenario.
    In the receiver adapter, we need to convert the XML into file(Inhouse format) by using seeburger mapping.
    We have generated the map for this in bic and used in Module configuration of receiver adapter.
    Now the question is I need to get each segment of XML file into a separate line in the output file like below.
    HDR ... ......
    DTL .........
    DTL ........
    where HDR is the header and DTL is the details segments.
    Iam getting the output in a single line like HDR.........DTL.........DTL.........
    but not as expected like above  .
    I tried by using newLine = true in module configuration, but no use.
    I digged into bic designer to search for any option , but no use.
    Kindly suggest me if any one has any idea on this.
    Thanks&Regards'
    Deepthi.

    Hi Deepthi,
        Did you find the solution, please let me now if you get.
    did you mention the below code to solve the issue.
    copy the below section in the NewMapping Program:
       SetDestinationDelimiter("SubElement", ">");
       SetDestinationDelimiter("Element", "~");
       SetDestinationDelimiter("Segment", "\n");
    Regards,
    Varun Reddy.K

  • Sender / Receiver ID mapping for EDI interfaces and Type of seeburger adapt

    We need to set up a interface using Seeburger adapter for Purchase order IDOC to 850 EDI mapping.. After reading from SDN,
    1) We can use the standard mapping in BIC MD to do E2X and X2E mapping..
    2) We can use any of the AS2, EDI generic adapter, Seeburger FTP adapter or Seeburger SFTP adapter...
    How do we decide which adapters should be chosen? I can see that it makes sense to use SFTP adapter or AS2 adapter for security...
    Also how do we map Sender and Receiver IDs on the EDI message.. Should this be hardcoded as part of mapping or is there any facility in seeburger adapter to do this? I saw some references to Party Identifiers and not sure how it is used in setting up Sender/ Receiver ID
    Also the graphical mapping to convert IDOC XML to EDI XML, Do we have standard mapping defined or do we need to create our own graphical mapping.

    Hi Kris,
    I had worked in the somehow same scenario, It was IDOC to EDIFACT file.
    I can give you few clues which might be helpful
    In BIC MD you have to create your own mapping if the standard mapping is not available (First check all the standard mappings in BIC). For your reference you need X2E mapping, as your scenario is IDOC to 850 EDI.
    "the graphical mapping to convert IDOC XML to EDI XML, Do we have standard mapping defined or do we need to create our own graphical mapping."
    In graphical mapping i created my own mapping, Seeburger has given some sample mappings you can check those for your reference (SEEBURGER_GENERIC_EDI software component). Mostly you have to create your own. You need a document from your functional consultant so that you are able to map correct fields and constants.
    "how do we map Sender and Receiver IDs on the EDI message.. Should this be hardcoded as part of mapping or is there any facility in seeburger adapter to do this? I saw some references to Party Identifiers and not sure how it is used in setting up Sender/ Receiver ID"
    This has been generally hardcoded in message mapping (In my case i hardcoded). If any of ur IDOC field contains that data you can map that field. But better Idea is ask your functional expert.
    "How do we decide which adapters should be chosen? I can see that it makes sense to use SFTP adapter or AS2 adapter for security... "
    You can choose adapter according to your requirement. In my case i used File adapter as i have to create file in PI server only. My suggestion you can use SFTP for seeburger
    Hope these points are helpfu for u
    Regards,
    Shradha

  • Generating IDoc DDF structures for EDI mapping

    Hello all,
    I am looking for a way to generate IDoc DDF structures to use them in the EDI mapping in Gentran.
    I was able to find one on ERPGenie.com (developed by Kevin Wilson) but it is only available for ECC 4.x. We are on ECC 6 and the program gives me an ABAP dump when I try to run it.
    Does anyone have the fix for this code? Or perhaps another way to accomplish this task?
    Actually, I am only interested in generating the MBGMCR02 IDoc
    Thanks for your help
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 7, 2008 12:36 PM

    It's been a long time since I have done any IDOC processing. 
    Go to SE37 and enter the function module IDOC_INPUT_ORDERS.  Display the source code.  Search for "CALL CUSTOMER".  You should see several "CALL CUSTOMER-FUNCTION" lines.  These are enhancements where you can manipulate the IDOC data.  If you locate the correct one (where the data is read from the IDOC but not yet validated), you should be able to map the partner function value.  Double-clicking on the number in quotes will bring you to an "EXIT_" function module.  A "ZX" INCLUDE program is referenced.  If you haven't used the exit yet, double-clicking on the ZX INCLUDE will create it.  The values passed into the function module are available in the INCLUDE.
    Ideally, you should create a project in transaction CMOD that references the chosen enhancement.  This way you can activate/deactivate without commenting/uncommenting the code in the INCLUDE.

  • Seeburger BIC mapping for 4030

    Hi,
        I have created a new mapping for ANSI X12 4030 using Seeburger Mapping designer. While converting from XML to EDI ANSI format the number included segments in the segment "SE" is calculated, does anyone know where this value will be calculated for 4010 version. so that i can incorprate the same for 4030 version
    With Regards
    K.Varadharajan

    Hi,
    SE indicate the starting of a Segment.Check below links for seeburger.
    Please see the below blogs
    /people/bla.suranyi/blog/2006/06/08/sap-xi-supports-edifact
    /people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
    /people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield
    http://www.stylusstudio.com/edi/XML_to_X12.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b0b355ae-0501-0010-3b83-8f2bb566fa47
    Details on XI EDI adapter from seeburger
    Check this for Conversions-
    /people/bla.suranyi/blog/2006/06/08/sap-xi-supports-edifact
    http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
    http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
    http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf
    SAP Adapters
    EDI with XI
    http://www.seeburger.com
    http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf
    http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
    http://www.seeburger.com/fileadmin/com/pdf/SEEBURGER_SAP_Adapter_engl.pdf
    http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
    http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf
    http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt
    http://www.sap.com/asia/company/events/nwtechdays/presentation/australia-slides/Pre-Built_Integration.pdf
    http://www.seeburger.com
    http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
    http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
    http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf
    http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt
    http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf
    http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
    http://www.seeburger.com/fileadmin/com/pdf/SEEBURGER_SAP_Adapter_engl.pdf
    http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
    http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf
    http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt
    http://www.sap.com/asia/company/events/nwtechdays/presentation/australia-slides/Pre-Built_Integration.pdf
    Regards,
    Phani
    Reward points if Helpful

  • IDOC EDI mapping ..

    hi,
    Please let me know if my understanding is correct. In SAP EDI setup two people involved, ABAP programmer who customzes the IDOCS, sets up the EDI setup on SAP side like number ranges, partner profiles, condition records, message control etc and monitors the IDOC status till it is transmitted to the EDI subsystem and also the IDOCs received at SAP end.
    The other person is an EDI specialist who will map the IDOCs to the EDI doc set based on trading partner requirements in the EDI subsystem.
    So the ABAP deveoper need not know anything about the mapping done at EDI subsystem ?? His job is only at the SAP end ?? Am I right ??
    thanks
    Edited by: sdnuser1 sdnsurname on Mar 20, 2008 6:03 AM

    Hi,
    Ur assumptions are correct up to some extent...
    What will happen SAP EDI implementation proejcts is most of the times it is the SAP technical people responsibility to do the EDI mapping also.
    So an ABAPer with EDI knowledege(ABAP/EDI consultant) will take care of SAP EDI settings at SAP side and he/she will develop the mapping document and hand over the same to EDI sybsystem provider.
    EDI subsystem people will feed the mapping instructions into EDI subsystem based on ur mapping document.Core EDI people will not understand the SAP terminology and as ABAP/EDI consultant will take of both settings.For an ABAP/EDI consultant also will not be given full access of EDI subsystem and u will only hand over the mapping docuemnt(IDOC segments to EDI standards mapping ) and they will feed the instructiona and get back 2 u for any doubts..
    Hope this help.Let me know if u need any help for further understanding..
    Rward if helpfulll
    ramesh

  • EDI Mapping

    Hi,
    As my client is implementing EDI through a trusted link, they had asked me to take care of the mapping section along with the development of interfaces.
    As generally the middleware or translator people would do the mapping processes, it is totally new for me.
    Please advise me in this regard where to start and what is the my job into this. 
    Do i have to map the incoming or outgoing edi standards to idoc segments.
    If so, what are the all things i need to know and do.
    As i have ample time, it would be nice for a quick start into it.
    Please help me in this regard.
    Thanks in advance,
    Anandh.B
    Points would be awarded for everyone ............

    Anandha,
    As you mentioned, EDI mapping is typically done using a middleware tool or EDI Translator.  Are they asking you to do mapping in ABAP or is there another tool you are going to use?
    If you are going to write ABAP programs to do your mapping you have a big challenge ahead of you.  You will need to become familiar with whatever EDI standards you will be mapping from.  These standards will have the layout of the messages that you will receive.
    If you are going to code all of this in ABAP you don't necessarily have to go to IDOCs however it can be very helpful when loading data.  By using SAP's IDOC technology and processing you have better traceability into the transaction posting in your system.
    In general this is what you will probably need to know:
    1.  Which EDI messages you will need to translate
    2.  Which IDOC types those messages correspond with
    3.  The structures of both the EDI messages and IDOCs
    4.  Setup of SAP IDOC system.  (Execute area menu WEDI from the main screen in SAP)
    5.  Set up of the application data for IDOC processing - particularly in the outbound - which partners will be recieving which messages
    I am sure there is a lot more but this will hopefully get you started.
    Chris

  • Edi mapping with Gentran

    Some one guide me in EDI Mapping with Gentran.....for Unix
    EX 856
    Ramesh

    I need Application integration Mapping guied line,,,,any helping documents (rules and steps) or guide or screen shots .....at present i need to do 856 mapping as soon as possible....any help is rewarded max,,,,,,Ramesh
    or Documents can send to my mail id [email protected]
    Note: Max points will rewareded for your help
    Ramesh

  • Mapping for Sales Order Idoc

    Hi Experts,
    I am facing problem with mapping for standard SalesOrder Idoc ORDERS.ORDER05.
    My Source Structure is: X12 EDI850
    <G_SPO1> (occrance 1..100000)
    <S_PO1> (occurance is 1..1)
                      <D_234/>
                      <D_234_2/>
                      <D_234_3/>
                      <D_234_4/>
                      <D_234_5/>
                      <D_234_6/>
                      <D_234_7/>
                      <D_234_8/>
                      <D_234_9/>
                      <D_234_10/>
    </S_PO1>
    </G_SPO1>
    Target Structure is:
    E1EDP01
        --->E1EDP19
                    --->IDTNR
    Functionality is passing material numbers of EDI customers to IDTNR field in E1EDP19 filed under segment E1EDP01.
    From source i will get set of material numbers, for one set 10 material numbers(In source you can find 10 fields for 10 material numbers)
    Requirement: I need to send those material numbers to IDTNR (One to one mapping ).
    For getting 10 material numbers i just duplicated segment E1EDP19 in target side and mapped one field of source to IDTNR target in each segment. Totally mapped 10 source fields in 10 segments.
    If 20 material numbers I will get two sets <G_SPO1> will repeat two times, each time 10 material numbers. So I mapped G_SPO1 to E1EDP01
    S_PO1 to E1EDP19.
    My out put is coming as 10 E1EDP19 segments under E1EDP01 if 10 materail numbers.
    But problem is ECC team asking to get one E1EDP19 line item value under E1EDP01 line item header. They are not accepting duplicate E1EDP19 segments under header E1EDP01.
    How to acheive this with my requirement.
    Appreciate your hellp on this.
    Thanks & Regards,
    A.Neelima.

    There is no relation between D_234 and D_356.
    I want to pass D_356 to KTEXT in all E1EDP01 segments which ever i will get based on the condition we implemented for E1EDP01.
    Present its coming only for E1EDP01 first segment (for which i used condition with D_234), its not coming for remaining 9 E1EDP01 segments (for which i used conditions with D_234_2 to D_234_10)
    If i pass sample input payload:
    <S_ST>
    <S_PID>
    <D_350>Description</D_350>
    </S_PID>
    <G_SPO1>
    <S_PO1>
    <D_234>1</D_234>
    <D_234_2/>2</D_234_2>
    <D_234_3/>
    <D_234_4/>
    <D_234_5/>
    <D_234_6/>
    <D_234_7/>
    <D_234_8/>
    <D_234_9/>
    <D_234_10/>
    </S_PO1>
    </G_SPO1>
    <G_SPO1>
    <S_PO1>
    <D_234>3</D_234>
    <D_234_2>4<D_234_2>
    <D_234_3/>
    <D_234_4/>
    <D_234_5/>
    <D_234_6/>
    <D_234_7/>
    <D_234_8/>
    <D_234_9/>
    <D_234_10/>
    </S_PO1>
    </G_SPO1>
    </S_ST>
    Coming Output Now: (KTEXT field is missing in last two segments)
    <E1EDP01>
    <E1EDP19>
    <IDTNR>1</IDTNR>
    <KTEXT>Decription</KTEXT>
    </E1EDP19>
    </E1EDP01>
    <E1EDP01>
    <E1EDP19>
    <IDTNR>3</IDTNR>
    <KTEXT>Decription</KTEXT>
    </E1EDP19>
    </E1EDP01>
    <E1EDP01>
    <E1EDP19>
    <IDTNR>2</IDTNR>
    </E1EDP19>
    </E1EDP01>
    <E1EDP01>
    <E1EDP19>
    <IDTNR>4</IDTNR>
    </E1EDP19>
    </E1EDP01>
    Expected Output:
    <E1EDP01>
    <E1EDP19>
    <IDTNR>1</IDTNR>
    <KTEXT>Decription</KTEXT>
    </E1EDP19>
    </E1EDP01>
    <E1EDP01>
    <E1EDP19>
    <IDTNR>3</IDTNR>
    <KTEXT>Decription</KTEXT>
    </E1EDP19>
    </E1EDP01>
    <E1EDP01>
    <E1EDP19>
    <IDTNR>2</IDTNR>
    <KTEXT>Decription</KTEXT>
    </E1EDP19>
    </E1EDP01>
    <E1EDP01>
    <E1EDP19>
    <IDTNR>4</IDTNR>
    <KTEXT>Decription</KTEXT>
    </E1EDP19>
    </E1EDP01>
    Thnaks & Regards,
    A.Neelima.

  • Error in code page mapping for Source System

    Hi All,
    We are Loading data into BI system from MDM System.
    It was loading fine but Yesterday we got an error " Error in code page mapping for Source System"
    Message Class: RSDS_ACCESS 13.
    We alreday tried to Search any IDOCs with error/unprocessed , but there isn't any.
    Any pointers for this error will be Helpful.
    Regards,
    Mayank

    Our SP currently SAPKW70019 , the SAP note mentioned above required to apply SP for 13, which we already beyond that...unfortunately we still face the same problem .. almost every day ..
    any advice.. ?
    Edited by: Edi Erwan  Abu Talib on Jun 22, 2009 8:22 AM

  • Java Mapping for Flat file

    hello SDNers,
    I am using JAVA mapping for converting FlatFlie IDoc to IDoc and i am using metadata for this.While downloading metadata from SAP system, the first segment in the data record is having level 2.
    1) What is the use of Level in metadata?
    2)  What is the Level for first segment in data record of metadata. Is it Level 1 or Level 2?
    3) I am facing an error while appending the node. Is it because of Level differs?
    Plese help me out and thanks in advance

    Hi,
    >>>I am using JAVA mapping for converting FlatFlie IDoc to IDoc and i am using metadata for thi
    why do you develop is from scratch is the code is already there - just copy and paste...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    >>>1) What is the use of Level in metadata?
    this shows how the nested segments in IDOC are to be understood
    >>>3) I am facing an error while appending the node. Is it because of Level differs?
    no, it becase your code is incorrect - the level velidation will be done at the receiver
    Regards,
    Michal Krawczyk

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • PI EDI help: What is the source of ISA13 in a IDOC to EDI mapping

    Hello Experts,
    It would be of great help if you can provide the field mapping for ISA 13 in outbound from IDOC sceanrio: 
    IDOC:  INVOIC02 - to - EDI 810 mapping.
    Is it the best practice to have ECC send the value in a particular IDOC field ( like  RFINT) or PI has to use a custom function to populate the ISA13 field.?
    Thank you,
    Patrick.

    Hi,
    ISA13 is for Interchange Control Number. It is a control number assigned by the interchange sender.
    Normally its Sequential number starting with 000000001 and incremented by 1 for each subsequent ISA between sender and receiver.
    This is a very useful value to include. It creates an explicit link between the IDoc and the EDI transmission. This number eases Production Support greatly. When there's an issue with a Partner EDI transmission, the Partner's EDI support people want to know the Interchange Control Number
    The IDoc interface does not process or check this field.
    regards
    Ganga

Maybe you are looking for