The most used examples of a master-detail relationship are purchase orders and a list of items belonging to each purchase order, an expense report with a set of expense line items or a department with a list of. To allow a master-detail to happens, we must have a relationship 1 to N between the master and the detail. I'm rambling a bit, but I hope you understand what I'm trying to say. The master-detail form is commonly used when we need to show the main form and his details, that is stored in a different table, at the same page. You want to display text, so you have to get a text value, even if it comes to you via a call to lookup.
View the full list of Tables for Customer Master. Think of the data you want to display, not what's actually in the table/record. SAP Customer Master Tables: KNA1 General Data in Customer Master, KNVV Customer Master Sales Data, KNB1 Customer Master (Company Code), KNVP Customer Master Partner Functions, KNVK Customer Master Contact Partner, KNKK Customer master credit management: Control area data, and more. You don't bind the ID, you bind the related text value.
You do have an underlying numerical value, true, but what you actually want to display is the text value from the related table, so you only use (not so only perhaps) the numeric ID-field to do the lookup. Granted, it would take only two lines of code, Remove and RemoveIf, but still, you'd have to do that yourself.
For me, I find PA to be more "current record geared", if you understand what I mean, and not so bothered by the underlying data structure - there are no ways to do automatic links between related tables for instance, you have to set that up by yourself, like you do in your example.Īnother example: if you want to delete a record and its related records, as fasr as I know, you would have to do that all by yourself in code, there is still no cascading delete you can do. Yup, I'd say it's the correct way to do it, but there might be other more advanced users who disagree with me.