gpt4all-13b-snoozy· OpenAI
Arena Human Preference 55K
write an abap program that selects and modifies a row in table AFIH based on field AKKNZ
- User
write an abap program that selects and modifies a row in table AFIH based on field AKKNZ
- Assistant
Here is an example ABAP program that selects and modifies a row in table AFIH based on field AKKNZ:
DATA: v_akknz TYPE akknz, v_afih_row TYPE afih-row. SELECT a FROM afih WHERE akknz = 'KKN' INTO TABLE atable. MODIFY a FROM atable INTO v_afih_row. IF sy-ucomm = 'X'. MODIFY v_afih_row FROM v_afih_row WHERE akknz = 'ZZ'. INTO afih AT TABLE. ENDIF.The program first selects a row from table AFIH where the field AKKNZ matches the value 'KKN'. It then stores the selected row into a temporary table, and modifies the value of the corresponding field in the temporary table. Finally, the program checks if the user has entered the command 'X' (which indicates that they want to modify the row), and if so, it modifies the value of the field in the AFIH table again.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.